Skip to content

Commit

Permalink
[Fixes #12594] Error when saing a new map
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiagiupponi committed Sep 23, 2024
1 parent 19e3815 commit 1892385
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion geonode/base/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ def to_internal_value(self, data):
def update(self, instance, validated_data):
user = self.context["request"].user
for field in user.APPROVAL_STATUS_FIELDS:
if not user.can_change_resource_field(instance, field):
if not user.can_change_resource_field(instance, field) and field in user.APPROVAL_STATUS_FIELDS:
validated_data.pop(field)
return super().update(instance, validated_data)

Expand Down

0 comments on commit 1892385

Please sign in to comment.