Skip to content

Commit

Permalink
Update DRF to ~=3.11.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dkliban committed Sep 16, 2020
1 parent 0eebef2 commit 9ad8cef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES/7508.misc
@@ -0,0 +1 @@
Upgrade DRF to ~=3.11.1
5 changes: 2 additions & 3 deletions pulpcore/app/serializers/content.py
Expand Up @@ -204,7 +204,6 @@ def validate(self, data):
of the checksums don't match their actual values.
"""
super().validate(data)

if "size" in data:
if data["file"].size != int(data["size"]):
raise serializers.ValidationError(_("The size did not match actual size of file."))
Expand Down Expand Up @@ -235,9 +234,9 @@ def validate(self, data):
models.Artifact.objects.all(),
message=_("{0} checksum must be " "unique.").format(algorithm),
)
validator.field_name = algorithm
validator.instance = None
validator(digest)

validator(digest, self.fields[algorithm])
return data

class Meta:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -9,7 +9,7 @@ django-filter~=2.3.0
django-guardian~=2.3.0
django-import-export~=2.3.0
django-lifecycle~=0.7.7
djangorestframework~=3.10.3
djangorestframework~=3.11.1
djangorestframework-queryfields~=1.0.0
drf-access-policy~=0.7.0
drf-nested-routers~=0.91.0
Expand Down

0 comments on commit 9ad8cef

Please sign in to comment.