From 6ec2463a764c6db796adc54830886658179d6588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Kr=C3=B6ger?= Date: Fri, 26 Apr 2024 09:49:12 +0200 Subject: [PATCH] Fix creation of entirely new GeoServer workspace --- geocatbridge/servers/models/geoserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/geocatbridge/servers/models/geoserver.py b/geocatbridge/servers/models/geoserver.py index 0b0aa31..36fd640 100644 --- a/geocatbridge/servers/models/geoserver.py +++ b/geocatbridge/servers/models/geoserver.py @@ -1266,7 +1266,7 @@ def _fixLayerStyle(self, style_name: str): def _createWorkspace( self, - namespace: dict[str, dict], + namespace: Optional[dict[str, dict]] = None, isolated: bool = False, acl_rules: Optional[dict[str, str]] = None, service_settings: Optional[dict[str, dict]] = None, @@ -1277,8 +1277,8 @@ def _createWorkspace( ws = {"workspace": {"name": self.workspace, "isolated": isolated}} self.request(url, data=ws, method="post") - self._setWorkspaceNamespace(namespace) - + if namespace: + self._setWorkspaceNamespace(namespace) if acl_rules: self._setWorkspaceACL(acl_rules) if service_settings: