fix: commit default campaign claim in ensure_admin_exists, surface setup errors to user
All checks were successful
Build and Push / build (push) Successful in 12m37s
All checks were successful
Build and Push / build (push) Successful in 12m37s
This commit is contained in:
@@ -102,7 +102,8 @@ def ensure_admin_exists():
|
||||
# Claim the "default" campaign for the admin so setup wizard works
|
||||
admin = db.get_user_by_username(ADMIN_USERNAME)
|
||||
if admin:
|
||||
conn.execute(
|
||||
"UPDATE campaigns SET created_by = ? WHERE id = 'default' AND created_by IS NULL",
|
||||
(admin["id"],),
|
||||
)
|
||||
with db.tx():
|
||||
conn.execute(
|
||||
"UPDATE campaigns SET created_by = ? WHERE id = 'default' AND created_by IS NULL",
|
||||
(admin["id"],),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user