Fix AttributeError in send_node_digest_notifications by preventing orphaned notifications #29

Merged
Groupr merged 3 commits from digest_notification into main 2025-10-20 16:58:44 -04:00
Groupr commented 2025-10-20 15:41:18 -04:00 (Migrated from git2.unturf.com)

Fix AttributeError: 'NoneType' object has no attribute 'node' in digest notification system.

Root Cause:

  • Scripts were deleting NodeEvent records without cleaning up associated NodeEventNotification records
  • This created orphaned notifications with null node_event references
  • When processing notifications, accessing notification.node_event.node.root failed

Changes:

  • Fixed delete_disabled_nodes.py to delete notifications before deleting events
  • Added defensive check in notify.py to skip orphaned notifications with logging
  • Added cleanup step in delete_disabled_nodes.py to remove existing orphaned notifications

Impact:

  • Prevents future orphaned notifications from being created
  • Cleans up existing orphaned notifications
  • Provides graceful handling of any remaining orphaned notifications
  • Maintains system stability for digest notification processing
Fix AttributeError: 'NoneType' object has no attribute 'node' in digest notification system. Root Cause: - Scripts were deleting NodeEvent records without cleaning up associated NodeEventNotification records - This created orphaned notifications with null node_event references - When processing notifications, accessing notification.node_event.node.root failed Changes: - Fixed delete_disabled_nodes.py to delete notifications before deleting events - Added defensive check in notify.py to skip orphaned notifications with logging - Added cleanup step in delete_disabled_nodes.py to remove existing orphaned notifications Impact: - Prevents future orphaned notifications from being created - Cleans up existing orphaned notifications - Provides graceful handling of any remaining orphaned notifications - Maintains system stability for digest notification processing
Groupr commented 2025-10-20 15:41:18 -04:00 (Migrated from git2.unturf.com)

requested review from @russellballestrini

requested review from @russellballestrini
russellballestrini commented 2025-10-20 16:09:16 -04:00 (Migrated from git2.unturf.com)

approved this merge request

approved this merge request
Groupr commented 2025-10-20 16:58:44 -04:00 (Migrated from git2.unturf.com)

mentioned in commit c4c20ca1d4

mentioned in commit c4c20ca1d4a09c5e3c821c7ff6ab2380cfdc2bce
Groupr (Migrated from git2.unturf.com) merged commit c4c20ca1d4 into main 2025-10-20 16:58:44 -04:00
russellballestrini (Migrated from git2.unturf.com) approved these changes 2026-06-20 23:25:08 -04:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: engineering/remarkbox#29
No description provided.