Fix BackupJob import error in backup_cancel function
🐛 Error Fixed: - NameError: name 'BackupJob' is not defined in backup_cancel view - Added missing 'from stiftung.models import BackupJob' import ✅ Backup cancellation now works correctly - Users can cancel long-running backup jobs without errors - Added local import following the same pattern as other backup functions The error occurred when trying to cancel a running backup job due to missing model import.
This commit is contained in:
@@ -6012,6 +6012,8 @@ def backup_restore(request):
|
||||
@login_required
|
||||
def backup_cancel(request, backup_id):
|
||||
"""Cancel a running backup job"""
|
||||
from stiftung.models import BackupJob
|
||||
|
||||
try:
|
||||
backup_job = BackupJob.objects.get(id=backup_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user