From 753f4f06065868c6da8976398731a99e8fd26c6e Mon Sep 17 00:00:00 2001 From: usmannasir Date: Fri, 8 Aug 2025 22:54:44 +0500 Subject: [PATCH] Fix: Preserve new INSTALLED_APPS during upgrade by not overwriting settings.py The issue was that restoreCriticalFiles was restoring the OLD settings.py from backup which didn't have new apps like 'aiScanner' in INSTALLED_APPS. Solution: - Modified restoreCriticalFiles to skip settings.py restoration - Keep the NEW settings.py from the fresh clone (which has aiScanner in INSTALLED_APPS) - Only update the DATABASES section with saved credentials from backup - This preserves all new app registrations while maintaining database connectivity This properly fixes the RuntimeError about aiScanner.status_models.ScanStatusUpdate not being in INSTALLED_APPS after upgrades. --- .idea/workspace.xml | 6 ++---- plogical/upgrade.py | 17 +++++++++++------ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 79d3321fd..a3bfbdbc5 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,9 +4,7 @@