Skip to content

Commit

Permalink
fix: expose empty changes with a change reason to the response
Browse files Browse the repository at this point in the history
  • Loading branch information
sirtawast committed Oct 8, 2024
1 parent 2ab7420 commit 2f6539e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion backend/benefit/applications/services/change_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,12 @@ def create_change_set(app_diff, employee_diffs):
employee_diff.changes, EXCLUDED_EMPLOYEE_FIELDS, True, delta_time
)

return change_set if len(change_set["changes"]) > 0 else None
return (
change_set
if len(change_set["changes"]) > 0
or (change_set["reason"] and len(change_set["reason"]) > 0)
else None
)

change_sets = list(
filter(
Expand Down

0 comments on commit 2f6539e

Please sign in to comment.