mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
Simplify translated string (#8860)
This commit is contained in:
parent
c815455461
commit
dcff7a5ccd
@ -1124,15 +1124,16 @@ def after_failed_task(sender, instance: Task, created: bool, **kwargs):
|
|||||||
except (ValueError, NoReverseMatch):
|
except (ValueError, NoReverseMatch):
|
||||||
url = ''
|
url = ''
|
||||||
|
|
||||||
|
# Function name
|
||||||
|
f = instance.func
|
||||||
|
|
||||||
notify_staff_users_of_error(
|
notify_staff_users_of_error(
|
||||||
instance,
|
instance,
|
||||||
'inventree.task_failure',
|
'inventree.task_failure',
|
||||||
{
|
{
|
||||||
'failure': instance,
|
'failure': instance,
|
||||||
'name': _('Task Failure'),
|
'name': _('Task Failure'),
|
||||||
'message': _(
|
'message': _(f"Background worker task '{f}' failed after {n} attempts"),
|
||||||
f"Background worker task '{instance.func}' failed after {n} attempts"
|
|
||||||
),
|
|
||||||
'link': url,
|
'link': url,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user