ensure new users get a default collection on signup and any missing users get them too
This commit is contained in:
@@ -162,6 +162,13 @@ def clear_api_limits():
|
||||
for l in limits:
|
||||
l.delete()
|
||||
|
||||
def ensure_default_collection():
|
||||
from .db import db
|
||||
from .models import BookmarkCollections
|
||||
with db.transaction():
|
||||
for missing_user in BookmarkCollections.get_users_without_default():
|
||||
BookmarkCollections.create_default(missing_user)
|
||||
|
||||
cache = Cache()
|
||||
|
||||
def create_app():
|
||||
@@ -243,6 +250,8 @@ def create_app():
|
||||
|
||||
reparse_babycode()
|
||||
|
||||
ensure_default_collection()
|
||||
|
||||
bind_default_badges(app.config['BADGES_PATH'])
|
||||
|
||||
app.config['SESSION_COOKIE_SECURE'] = True
|
||||
|
||||
Reference in New Issue
Block a user