Skip to content

Commit

Permalink
Merge pull request #105 from zalf-rdm/issue_#104_Bug_setting_a_funder…
Browse files Browse the repository at this point in the history
…_with_fundingreference_is_not_working

[Fixes #104] Bug: setting a funder with fundingreference is not working
  • Loading branch information
mwallschlaeger authored Jun 6, 2024
2 parents 924b6e8 + c302b20 commit 94d83ad
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion geonode/base/api/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
8 changes: 0 additions & 8 deletions geonode/base/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion geonode/base/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@
FullLicenseSerializer,
RelationTypeSerializer,
RelatedIdentifierTypeSerializer,
RelatedIdentifierSerializer,
FundingReferenceSerializer,
RelatedIdentifierSerializer,
RelatedProjectSerializer,
RegionSerializer,
ThesaurusKeywordSerializer,
Expand Down

0 comments on commit 94d83ad

Please sign in to comment.