Files
stiftung-management-system/app/stiftung
Jan Remmer Siebels 92b689f5e7 Fix User DoesNotExist error in backup_cancel by using created_by_id
🐛 Root Cause Found & Fixed:
- Error occurred when accessing backup_job.created_by where the referenced user was deleted
- Django was trying to fetch a User object that no longer exists
- Changed to use backup_job.created_by_id instead of backup_job.created_by
- This avoids the foreign key lookup that was causing the 'User matching query does not exist' error

 Backup cancellation now works even when:
- Original creator user has been deleted from the database
- Foreign key relationship is broken but ID is still stored

The backup job can now be cancelled without triggering user lookup errors.
2025-09-29 22:14:06 +02:00
..