@@ -587,11 +587,10 @@ def validate(self, data):
587587 except models .Manifest .DoesNotExist :
588588 raise serializers .ValidationError (
589589 _ (
590- "A manifest with the digest '{}' does not "
591- "exist in the latest repository version '{}'" .format (
592- new_data ["digest" ], latest_version
593- )
590+ "A manifest with the digest '%s' does not "
591+ "exist in the latest repository version '%s'"
594592 )
593+ % (new_data ["digest" ], latest_version )
595594 )
596595
597596 new_data ["manifest" ] = manifest
@@ -616,11 +615,8 @@ def validate(self, data):
616615 models .Tag .objects .get (pk__in = latest_version .content .all (), name = new_data ["tag" ])
617616 except models .Tag .DoesNotExist :
618617 raise serializers .ValidationError (
619- _ (
620- "The tag '{}' does not exist in the latest repository version '{}'" .format (
621- new_data ["tag" ], latest_version
622- )
623- )
618+ _ ("The tag '%s' does not exist in the latest repository version '%s'" )
619+ % (new_data ["tag" ], latest_version )
624620 )
625621
626622 return new_data
@@ -645,7 +641,7 @@ def validate(self, data):
645641 if content_units :
646642 if "*" in content_units and len (content_units ) > 1 :
647643 raise serializers .ValidationError (
648- _ ("'*' should be the only item present in the {}" .format (content_units ) )
644+ _ ("'*' should be the only item present in the {}" ) .format (content_units )
649645 )
650646 return data
651647
@@ -739,11 +735,10 @@ def validate(self, data):
739735 except models .Manifest .DoesNotExist :
740736 raise serializers .ValidationError (
741737 _ (
742- "A manifest with the digest '{}' does not "
743- "exist in the latest repository version '{}'" .format (
744- new_data ["digest" ], latest_version
745- )
738+ "A manifest with the digest '%s' does not "
739+ "exist in the latest repository version '%s'"
746740 )
741+ % (new_data ["digest" ], latest_version )
747742 )
748743
749744 new_data ["manifest" ] = manifest
@@ -782,11 +777,10 @@ def validate(self, data):
782777 if not sigs_pks :
783778 raise serializers .ValidationError (
784779 _ (
785- "There are no signatures in the latest repository version '{}' "
786- "produced with the specified key_id '{}'" .format (
787- latest_version , new_data ["signed_with_key_id" ]
788- )
780+ "There are no signatures in the latest repository version '%s' "
781+ "produced with the specified key_id '%s'"
789782 )
783+ % (latest_version , new_data ["signed_with_key_id" ])
790784 )
791785
792786 new_data ["sigs_pks" ] = sigs_pks
0 commit comments