mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
PEP fixes
This commit is contained in:
parent
2370e41961
commit
13d8bf437a
@ -1067,10 +1067,10 @@ 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,
|
||||
)
|
||||
trigger_event('build.created', build_id=instance.pk)
|
||||
|
||||
else:
|
||||
trigger_event('build.saved', build_id=instance.pk)
|
||||
|
||||
|
||||
class BuildOrderAttachment(InvenTreeAttachment):
|
||||
|
@ -471,7 +471,7 @@ class PurchaseOrder(Order):
|
||||
|
||||
|
||||
@receiver(post_save, sender=PurchaseOrder, dispatch_uid='po_post_save_log')
|
||||
def after_save_build(sender, instance: PurchaseOrder, created: bool, **kwargs):
|
||||
def after_save_po(sender, instance: PurchaseOrder, created: bool, **kwargs):
|
||||
|
||||
if created:
|
||||
trigger_event('purchaseorder.created', order_id=instance.pk)
|
||||
@ -773,7 +773,7 @@ class SalesOrder(Order):
|
||||
|
||||
|
||||
@receiver(post_save, sender=SalesOrder, dispatch_uid='so_post_save_log')
|
||||
def after_save_build(sender, instance: SalesOrder, created: bool, **kwargs):
|
||||
def after_save_so(sender, instance: SalesOrder, created: bool, **kwargs):
|
||||
|
||||
if created:
|
||||
trigger_event('salesorder.created', order_id=instance.pk)
|
||||
|
Loading…
Reference in New Issue
Block a user