mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
remove debug prints
This commit is contained in:
parent
453589dbcb
commit
6c6683657e
@ -176,19 +176,13 @@ def trigger_notifaction(obj, category=None, obj_ref='pk', targets=None, target_f
|
|||||||
# Collect possible methods
|
# Collect possible methods
|
||||||
delivery_methods = inheritors(NotificationMethod)
|
delivery_methods = inheritors(NotificationMethod)
|
||||||
|
|
||||||
# TODO remove -> this is for debugging the delivery method runfs
|
|
||||||
if settings.TESTING:
|
|
||||||
print(delivery_methods)
|
|
||||||
|
|
||||||
for method in [a for a in delivery_methods if a not in [SingleNotificationMethod, BulkNotificationMethod]]:
|
for method in [a for a in delivery_methods if a not in [SingleNotificationMethod, BulkNotificationMethod]]:
|
||||||
logger.info(f"Triggering method '{method.METHOD_NAME}'")
|
logger.info(f"Triggering method '{method.METHOD_NAME}'")
|
||||||
try:
|
try:
|
||||||
deliver_notification(method, obj, category, targets, context)
|
deliver_notification(method, obj, category, targets, context)
|
||||||
except NotImplementedError as error:
|
except NotImplementedError as error:
|
||||||
print('NotImplementedError')
|
|
||||||
raise error
|
raise error
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
print(error)
|
|
||||||
logger.error(error)
|
logger.error(error)
|
||||||
|
|
||||||
# Set delivery flag
|
# Set delivery flag
|
||||||
|
Loading…
Reference in New Issue
Block a user