Skip to content
Snippets Groups Projects
Commit 6f9a97d1 authored by m431m's avatar m431m
Browse files

Fixed bug

parent e4528d44
No related branches found
No related tags found
No related merge requests found
...@@ -520,7 +520,7 @@ class FeatureTypeModel(LayerModel): ...@@ -520,7 +520,7 @@ class FeatureTypeModel(LayerModel):
# Configure the connection to the store. # Configure the connection to the store.
# This is a little hacky as we have to translate stuff... # This is a little hacky as we have to translate stuff...
info = ws.get_datastore_info(ds_name) info = ws.get_datastore_info(ds_name, exclude_password=False)
cparam = info["connectionParameters"] cparam = info["connectionParameters"]
if cparam.get("dbtype", None) in ["postgis", "postgres", "postgresql"]: if cparam.get("dbtype", None) in ["postgis", "postgres", "postgresql"]:
self.ms.connectiontype = mapscript.MS_POSTGIS self.ms.connectiontype = mapscript.MS_POSTGIS
...@@ -757,11 +757,14 @@ class Workspace(Mapfile): ...@@ -757,11 +757,14 @@ class Workspace(Mapfile):
return self.get_store("datastore", name) return self.get_store("datastore", name)
def get_datastore_info(self, name): def get_datastore_info(self, name, exclude_password=True):
"""Returns info for a datastore from the workspace.""" """Returns info for a datastore from the workspace."""
return self.get_store_info( exclude = []
"datastore", name, exclude=["connectionParameters.password"]) if exclude_password:
exclude.append("connectionParameters.password")
return self.get_store_info("datastore", name, exclude=exclude)
def iter_datastore_names(self): def iter_datastore_names(self):
"""Return an iterator over the datastore names.""" """Return an iterator over the datastore names."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment