Skip to content

Commit 5e9220c

Browse files
committed
fix logging in long rebate
1 parent 62b0e57 commit 5e9220c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

home/signals.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ def update_long_bill(sender, instance: LongRebate, **kwargs):
105105
logger.info("Signal called for Updating Long Rebate")
106106
try:
107107
old_instance = LongRebate.objects.get(pk=instance.pk)
108-
logger.info(instance.approved, getattr(instance, "reason", "No reason"))
108+
reason = instance.reason if instance.reason is not None else "No reason"
109+
logger.info(instance.approved, reason)
109110
if (
110111
old_instance.approved != instance.approved
111112
or old_instance.reason != instance.reason

0 commit comments

Comments
 (0)