AM
@receiver(post_save, sender=CustomerTransaction)
def replenish_account(sender, instance, **kwargs):
if instance.processed == '1':
owner = instance.customer
owner.balance += instance.amount
owner.threshold_notice = False
owner.critical_notice = False
if owner.email_verified and owner.billing_notification:
owner.send_payment_success_email(instance)
owner.save()
