Voucher import: Fix quota name check

This commit is contained in:
Raphael Michel
2024-04-24 10:24:18 +02:00
parent 239a7746df
commit 11a6390cfc
2 changed files with 16 additions and 1 deletions

View File

@@ -251,7 +251,7 @@ class QuotaColumn(ImportColumn):
raise ValidationError(_("You cannot specify a quota if you specified a product."))
matches = [
q for q in self.quotas
if str(q.pk) == value or any((v and v == value) for v in i18n_flat(q.name))
if str(q.pk) == value or q.name == value
]
if len(matches) == 0:
raise ValidationError(_("No matching variation was found."))