Skip to content

Commit

Permalink
fix mistake when there is no searchproviders (#77)
Browse files Browse the repository at this point in the history
Co-authored-by: Clément Zitouni <[email protected]>
  • Loading branch information
cazitouni and Clément Zitouni authored Jan 16, 2024
1 parent 8bb6355 commit 192bafa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/themes/controllers/themes_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ def create_form(self, theme=None):
form.backgroundLayers.append_entry(data)
form.backgroundLayers[i].layerName.choices = self.get_backgroundlayers()
form.backgroundLayers[i].layerName.data = layer["name"]
qgis_search = [provider for provider in theme["searchProviders"] if "provider" in provider and provider["provider"] == "qgis"]
qgis_search = [provider for provider in theme.get("searchProviders", []) if "provider" in provider and provider.get("provider") == "qgis"]
if qgis_search :
for provider in qgis_search:
data = {
Expand Down

0 comments on commit 192bafa

Please sign in to comment.