refactor: clean up code by adding missing commas and improving import order
This commit is contained in:
@@ -68,7 +68,7 @@ def migrate_users_to_plans():
|
||||
# 0 credits means they spent them, NULL means they never got assigned
|
||||
try:
|
||||
users_without_credits = User.query.filter(
|
||||
User.plan_id.isnot(None), User.credits.is_(None)
|
||||
User.plan_id.isnot(None), User.credits.is_(None),
|
||||
).all()
|
||||
except Exception:
|
||||
# Credits column doesn't exist yet, will be handled by create_all
|
||||
@@ -113,7 +113,7 @@ def migrate_users_to_plans():
|
||||
if updated_count > 0:
|
||||
db.session.commit()
|
||||
print(
|
||||
f"Updated {updated_count} existing users with plans and credits"
|
||||
f"Updated {updated_count} existing users with plans and credits",
|
||||
)
|
||||
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user