mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
use f-string annotation
This commit is contained in:
parent
0baffcaee5
commit
b974b5fc30
@ -620,7 +620,7 @@ class DataFileExtractSerializer(serializers.Serializer):
|
||||
# Check for missing required columns
|
||||
if required:
|
||||
if name not in self.columns:
|
||||
raise serializers.ValidationError(_("Missing required column: '{name}'"))
|
||||
raise serializers.ValidationError(_(f"Missing required column: '{name}'"))
|
||||
|
||||
for col in self.columns:
|
||||
|
||||
@ -629,7 +629,7 @@ class DataFileExtractSerializer(serializers.Serializer):
|
||||
|
||||
# Check for duplicated columns
|
||||
if col in cols_seen:
|
||||
raise serializers.ValidationError(_("Duplicate column: '{col}'"))
|
||||
raise serializers.ValidationError(_(f"Duplicate column: '{col}'"))
|
||||
|
||||
cols_seen.add(col)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user