2
0
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:
Oliver 2025-01-08 12:55:56 +11:00 committed by GitHub
parent c815455461
commit dcff7a5ccd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1124,15 +1124,16 @@ def after_failed_task(sender, instance: Task, created: bool, **kwargs):
except (ValueError, NoReverseMatch):
url = ''
# Function name
f = instance.func
notify_staff_users_of_error(
instance,
'inventree.task_failure',
{
'failure': instance,
'name': _('Task Failure'),
'message': _(
f"Background worker task '{instance.func}' failed after {n} attempts"
),
'message': _(f"Background worker task '{f}' failed after {n} attempts"),
'link': url,
},
)