@@ -573,11 +573,10 @@ def validate(self, data):
573573 except models .Manifest .DoesNotExist :
574574 raise serializers .ValidationError (
575575 _ (
576- "A manifest with the digest '{}' does not "
577- "exist in the latest repository version '{}'" .format (
578- new_data ["digest" ], latest_version
579- )
576+ "A manifest with the digest '%s' does not "
577+ "exist in the latest repository version '%s'"
580578 )
579+ % (new_data ["digest" ], latest_version )
581580 )
582581
583582 new_data ["manifest" ] = manifest
@@ -602,11 +601,8 @@ def validate(self, data):
602601 models .Tag .objects .get (pk__in = latest_version .content .all (), name = new_data ["tag" ])
603602 except models .Tag .DoesNotExist :
604603 raise serializers .ValidationError (
605- _ (
606- "The tag '{}' does not exist in the latest repository version '{}'" .format (
607- new_data ["tag" ], latest_version
608- )
609- )
604+ _ ("The tag '%s' does not exist in the latest repository version '%s'" )
605+ % (new_data ["tag" ], latest_version )
610606 )
611607
612608 return new_data
@@ -631,7 +627,7 @@ def validate(self, data):
631627 if content_units :
632628 if "*" in content_units and len (content_units ) > 1 :
633629 raise serializers .ValidationError (
634- _ ("'*' should be the only item present in the {}" .format (content_units ) )
630+ _ ("'*' should be the only item present in the {}" ) .format (content_units )
635631 )
636632 return data
637633
@@ -725,11 +721,10 @@ def validate(self, data):
725721 except models .Manifest .DoesNotExist :
726722 raise serializers .ValidationError (
727723 _ (
728- "A manifest with the digest '{}' does not "
729- "exist in the latest repository version '{}'" .format (
730- new_data ["digest" ], latest_version
731- )
724+ "A manifest with the digest '%s' does not "
725+ "exist in the latest repository version '%s'"
732726 )
727+ % (new_data ["digest" ], latest_version )
733728 )
734729
735730 new_data ["manifest" ] = manifest
@@ -768,11 +763,10 @@ def validate(self, data):
768763 if not sigs_pks :
769764 raise serializers .ValidationError (
770765 _ (
771- "There are no signatures in the latest repository version '{}' "
772- "produced with the specified key_id '{}'" .format (
773- latest_version , new_data ["signed_with_key_id" ]
774- )
766+ "There are no signatures in the latest repository version '%s' "
767+ "produced with the specified key_id '%s'"
775768 )
769+ % (latest_version , new_data ["signed_with_key_id" ])
776770 )
777771
778772 new_data ["sigs_pks" ] = sigs_pks
0 commit comments