mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-16 20:15:44 +00:00
Simplify event triggering
- add generic receivers for database actions - exclude django_q tables, otherwise we get an infinite loop! Ref: https://stackoverflow.com/questions/17507784/consolidating-multiple-post-save-signals-with-one-receiver/32230933#32230933
This commit is contained in:
@ -1067,11 +1067,6 @@ def after_save_build(sender, instance: Build, created: bool, **kwargs):
|
||||
# Run checks on required parts
|
||||
InvenTree.tasks.offload_task('build.tasks.check_build_stock', instance)
|
||||
|
||||
trigger_event('build.created', build_id=instance.pk)
|
||||
|
||||
else:
|
||||
trigger_event('build.saved', build_id=instance.pk)
|
||||
|
||||
|
||||
class BuildOrderAttachment(InvenTreeAttachment):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user