Fix i18n of OrderError

This commit is contained in:
Raphael Michel
2019-08-17 14:07:56 +02:00
parent 102772ec55
commit ad94263374

View File

@@ -403,7 +403,15 @@ def _cancel_order(order, user=None, send_mail: bool=True, api_token=None, device
class OrderError(LazyLocaleException):
pass
def __init__(self, *args):
msg = args[0]
msgargs = args[1] if len(args) > 1 else None
self.args = args
if msgargs:
msg = _(msg) % msgargs
else:
msg = _(msg)
super().__init__(msg)
def _check_date(event: Event, now_dt: datetime):