From 4a74a1a405098c434a8420496594521598322620 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Mon, 13 Jul 2026 14:41:23 -0400 Subject: [PATCH] WJ import loader: mark setup_complete (a full import is the setup) A freshly-imported DB left setup_complete unset, so the admin was bounced into the first-run wizard even though the instance is fully populated. The harness now sets setup_complete=true (it already mints the admin), so an imported instance goes straight to the app. --- scripts/site_imports/wjf/harness.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/site_imports/wjf/harness.py b/scripts/site_imports/wjf/harness.py index 9c11d0e..888059b 100644 --- a/scripts/site_imports/wjf/harness.py +++ b/scripts/site_imports/wjf/harness.py @@ -118,6 +118,10 @@ class Harness: plugin.on_install(self.app) except Exception: pass + # A full import IS the setup, so mark it complete - otherwise the admin + # is bounced to the first-run wizard on every fresh import DB. + from shopdb.core.models import Setting + Setting.set('setup_complete', 'true', valuetype='boolean', category='site') db.session.commit() def _mint_admin_pat(self):