Skip to content

Commit

Permalink
fix: docker image owner
Browse files Browse the repository at this point in the history
  • Loading branch information
Topvennie committed May 14, 2024
1 parent 33d118d commit 3a58f86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/api/serializers/docker_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ class Meta:
def validate(self, attrs):
data = super().validate(attrs=attrs)

data["owner"] = self.context["request"].user
if not self.partial:
data["owner"] = self.context["request"].user

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

0 comments on commit 3a58f86

Please sign in to comment.