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: