Do not allow currency codes that to not represent money (#4056)

* Do not allow currency codes that to not represent money

* Rebase migration

* Fix blacklist
This commit is contained in:
Raphael Michel
2024-04-22 16:22:30 +02:00
committed by GitHub
parent 79d59553d7
commit 0f696f42f6
5 changed files with 45 additions and 1 deletions

View File

@@ -1237,6 +1237,9 @@ class Event(EventMixin, LoggedModel):
if self.has_paid_things and not self.has_payment_provider:
issues.append(_('You have configured at least one paid product but have not enabled any payment methods.'))
if self.has_paid_things and self.currency == "XXX":
issues.append(_('You have configured at least one paid product but have not configured a currency.'))
if not self.quotas.exists():
issues.append(_('You need to configure at least one quota to sell anything.'))