2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

and again

This commit is contained in:
Matthias
2021-12-04 03:44:59 +01:00
parent 3a8909f0d4
commit c10841fe0e
2 changed files with 3 additions and 3 deletions

View File

@ -139,7 +139,7 @@ class UIMessageNotification(SingleNotificationMethod):
# endregion
def trigger_notifaction(obj, entry_name=None, obj_ref='pk', targets=None, receiver_fnc=None, receiver_args=[], receiver_kwargs={}, notification_context={}):
def trigger_notifaction(obj, entry_name=None, obj_ref='pk', targets=None, target_fnc=None, target_args=[], target_kwargs={}, notification_context={}):
"""
Send out an notification
"""
@ -168,7 +168,7 @@ def trigger_notifaction(obj, entry_name=None, obj_ref='pk', targets=None, receiv
logger.info(f"Gathering users for notification '{entry_name}'")
# Collect possible targets
if not targets:
targets = receiver_fnc(*receiver_args, **receiver_kwargs)
targets = target_fnc(*target_args, **target_kwargs)
if targets:
logger.info(f"Sending notification '{entry_name}' for '{str(obj)}'")