Skip to content

Commit 3a8cfbb

Browse files
[Fixes #12924] adding title subhandler
1 parent 56ff3e0 commit 3a8cfbb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

geonode/metadata/handlers/base.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ def update_subschema(cls, subschema, lang=None):
7676
subschema["default"] = "Publication"
7777

7878

79+
class TitleSubHandler(SubHandler):
80+
@classmethod
81+
def deserialize(cls, field_value):
82+
# ref https://github.com/GeoNode/geonode/issues/8198
83+
return field_value.replace(",", "_")
84+
85+
7986
class DateSubHandler(SubHandler):
8087
@classmethod
8188
def serialize(cls, value):
@@ -157,6 +164,7 @@ def deserialize(cls, field_value):
157164

158165

159166
SUBHANDLERS = {
167+
"title": TitleSubHandler,
160168
"category": CategorySubHandler,
161169
"date_type": DateTypeSubHandler,
162170
"date": DateSubHandler,

0 commit comments

Comments
 (0)