Clear caches after populate and enable foreign keys in SQLite

This commit is contained in:
Kevin Chung
2020-04-27 18:33:53 -04:00
parent abcb791b73
commit 6092ed1f31
2 changed files with 16 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ import random
import argparse
from CTFd import create_app
from CTFd.cache import clear_config, clear_standings, clear_pages
from CTFd.models import (
Users,
Teams,
@@ -338,3 +339,7 @@ if __name__ == "__main__":
db.session.commit()
db.session.close()
clear_config()
clear_standings()
clear_pages()