diff --git a/geonode/base/api/fields.py b/geonode/base/api/fields.py index 84283af29f4..30bee56b73b 100644 --- a/geonode/base/api/fields.py +++ b/geonode/base/api/fields.py @@ -53,7 +53,7 @@ def to_internal_value_single(self, data, serializer): funder = Funder.objects.get_or_create(**data) except TypeError: raise ParseError(detail="Could not convert related_identifier to internal object ...", code=400) - return funder + return funder[0] class ComplexDynamicRelationField(DynamicRelationField): diff --git a/geonode/base/api/serializers.py b/geonode/base/api/serializers.py index 0752aad8c8c..ec43c14d115 100644 --- a/geonode/base/api/serializers.py +++ b/geonode/base/api/serializers.py @@ -1015,14 +1015,6 @@ class Meta: fields = "__all__" -class FundingReferenceSerializer(DynamicModelSerializer): - class Meta: - name = "fundingreferences" - model = FundingReference - count_type = "fundingreferences" - fields = "__all__" - - class RelatedProjectSerializer(DynamicModelSerializer): class Meta: name = "relatedprojects" diff --git a/geonode/base/api/views.py b/geonode/base/api/views.py index e268148032e..1541d8db12b 100644 --- a/geonode/base/api/views.py +++ b/geonode/base/api/views.py @@ -122,8 +122,8 @@ FullLicenseSerializer, RelationTypeSerializer, RelatedIdentifierTypeSerializer, - RelatedIdentifierSerializer, FundingReferenceSerializer, + RelatedIdentifierSerializer, RelatedProjectSerializer, RegionSerializer, ThesaurusKeywordSerializer,