Skip to content

Commit

Permalink
Fix qgisserver-plugin-config for URL/params
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed May 2, 2023
1 parent f12745b commit 857adc2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/qgisserver-plugin-config
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ def main() -> None:

# With QGIS server plugin we interpret the value in the config container
for key, value in gmf_config["vars"]["servers"].items():
gmf_config["vars"]["servers"][key] = value.replace("{", "${")
if isinstance(value, dict):
for param_name, param_value in value.get('params', {}).items():
value["params"][param_name] = param_value.replace("{", "${")
value["url"] = value["url"].replace("{", "${")
else:
gmf_config["vars"]["servers"][key] = value.replace("{", "${")
for key in ("srid", "servers"):
if key not in config["vars"]:
config["vars"][key] = gmf_config["vars"][key]
Expand Down

0 comments on commit 857adc2

Please sign in to comment.