From 7a4a1bf0a8fce873b97709ba10166c8a2bc43453 Mon Sep 17 00:00:00 2001 From: afabiani Date: Wed, 14 Apr 2021 15:08:25 +0200 Subject: [PATCH] [Fixes #130] REST API v2 endpoint for GeoStories throws an exception (cherry picked from commit 895e60af6903fc4e6dfd3a4d8a87f4e255569efc) --- .../geoapps/geostories/translation.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 mapstore2_adapter/geoapps/geostories/translation.py diff --git a/mapstore2_adapter/geoapps/geostories/translation.py b/mapstore2_adapter/geoapps/geostories/translation.py new file mode 100644 index 0000000000..62732c946c --- /dev/null +++ b/mapstore2_adapter/geoapps/geostories/translation.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +######################################################################### +# +# Copyright (C) 2021 OSGeo +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +######################################################################### + +from modeltranslation.translator import translator, TranslationOptions +from .models import GeoStory + + +class GeoStoriesTranslationOptions(TranslationOptions): + fields = () + + +translator.register(GeoStory, GeoStoriesTranslationOptions)