diff --git a/umap/models.py b/umap/models.py index 857a01f5..e3db885e 100644 --- a/umap/models.py +++ b/umap/models.py @@ -218,7 +218,7 @@ class Map(NamedModel): "umap_id": self.pk, "onLoadPanel": "none", "captionBar": False, - "schema": self.schema, + "schema": self.extra_schema, "slideshow": {}, } ) @@ -330,15 +330,12 @@ class Map(NamedModel): return new @classproperty - def schema(self): - schema = settings.UMAP_SCHEMA - schema.setdefault( - "iconUrl", - { + def extra_schema(self): + return { + "iconUrl": { "default": "%sumap/img/marker.svg" % settings.STATIC_URL, - }, - ) - return schema + } + } class Pictogram(NamedModel): diff --git a/umap/settings/base.py b/umap/settings/base.py index 6766ea42..d29d08eb 100644 --- a/umap/settings/base.py +++ b/umap/settings/base.py @@ -256,7 +256,6 @@ UMAP_DEFAULT_SHARE_STATUS = None UMAP_DEFAULT_EDIT_STATUS = None UMAP_DEFAULT_FEATURES_HAVE_OWNERS = False UMAP_HOME_FEED = "latest" -UMAP_SCHEMA = {} UMAP_READONLY = env("UMAP_READONLY", default=False) UMAP_GZIP = True diff --git a/umap/views.py b/umap/views.py index fcdcd1b5..aadd3fc7 100644 --- a/umap/views.py +++ b/umap/views.py @@ -488,7 +488,7 @@ class MapDetailMixin: "urls": _urls_for_js(), "tilelayers": TileLayer.get_list(), "editMode": self.edit_mode, - "schema": Map.schema, + "schema": Map.extra_schema, "umap_id": self.get_umap_id(), "starred": self.is_starred(), "licences": dict((l.name, l.json) for l in Licence.objects.all()),