PEP fixes

This commit is contained in:
Oliver 2022-01-10 09:02:11 +11:00
parent 2370e41961
commit 13d8bf437a
2 changed files with 6 additions and 6 deletions

View File

@ -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):

View File

@ -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)