@@ -564,10 +564,8 @@ def validate(self, data):
564564 raise serializers .ValidationError (
565565 _ (
566566 "A manifest with the digest '{}' does not "
567- "exist in the latest repository version '{}'" .format (
568- new_data ["digest" ], latest_version
569- )
570- )
567+ "exist in the latest repository version '{}'"
568+ ).format (new_data ["digest" ], latest_version )
571569 )
572570
573571 new_data ["manifest" ] = manifest
@@ -592,10 +590,8 @@ def validate(self, data):
592590 models .Tag .objects .get (pk__in = latest_version .content .all (), name = new_data ["tag" ])
593591 except models .Tag .DoesNotExist :
594592 raise serializers .ValidationError (
595- _ (
596- "The tag '{}' does not exist in the latest repository version '{}'" .format (
597- new_data ["tag" ], latest_version
598- )
593+ _ ("The tag '{}' does not exist in the latest repository version '{}'" ).format (
594+ new_data ["tag" ], latest_version
599595 )
600596 )
601597
@@ -621,8 +617,9 @@ def validate(self, data):
621617 if content_units :
622618 if "*" in content_units and len (content_units ) > 1 :
623619 raise serializers .ValidationError (
624- _ ("'*' should be the only item present in the {}" .format (content_units ) )
620+ _ ("'*' should be the only item present in the {}" ) .format (content_units )
625621 )
622+
626623 return data
627624
628625
@@ -716,10 +713,8 @@ def validate(self, data):
716713 raise serializers .ValidationError (
717714 _ (
718715 "A manifest with the digest '{}' does not "
719- "exist in the latest repository version '{}'" .format (
720- new_data ["digest" ], latest_version
721- )
722- )
716+ "exist in the latest repository version '{}'"
717+ ).format (new_data ["digest" ], latest_version )
723718 )
724719
725720 new_data ["manifest" ] = manifest
@@ -759,10 +754,8 @@ def validate(self, data):
759754 raise serializers .ValidationError (
760755 _ (
761756 "There are no signatures in the latest repository version '{}' "
762- "produced with the specified key_id '{}'" .format (
763- latest_version , new_data ["signed_with_key_id" ]
764- )
765- )
757+ "produced with the specified key_id '{}'"
758+ ).format (latest_version , new_data ["signed_with_key_id" ])
766759 )
767760
768761 new_data ["sigs_pks" ] = sigs_pks
0 commit comments