Skip to content

Commit

Permalink
chore: allow owner updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Topvennie committed May 15, 2024
1 parent f94c421 commit 087a8f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/api/serializers/docker_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def validate(self, attrs):
if not self.partial:
data["owner"] = self.context["request"].user
else:
data["owner"] = self.instance.owner
data["owner"] = data["owner"] if "owner" in data else self.instance.owner

if "public" in data and data["public"] and not data["owner"].is_staff:
raise ValidationError(_("docker.errors.custom"))
Expand Down

0 comments on commit 087a8f4

Please sign in to comment.