diff --git a/geonode/metadata/handlers/base.py b/geonode/metadata/handlers/base.py index 1b058cb3d55..a9ff33017d0 100644 --- a/geonode/metadata/handlers/base.py +++ b/geonode/metadata/handlers/base.py @@ -134,7 +134,7 @@ def serialize(cls, db_value): @classmethod def deserialize(cls, field_value): - return RestrictionCodeType.objects.get(identifier=field_value) + return RestrictionCodeType.objects.get(identifier=field_value) if field_value else None class SpatialRepresentationTypeSubHandler(SubHandler): @@ -153,7 +153,7 @@ def serialize(cls, db_value): @classmethod def deserialize(cls, field_value): - return SpatialRepresentationType.objects.get(identifier=field_value) + return SpatialRepresentationType.objects.get(identifier=field_value) if field_value else None SUBHANDLERS = {