Fix NameError in 1_2_0_upgrade_2_0_0.py

Fixes a NameError in `1_2_0_upgrade_2_0_0.py`
bulk-clear-sessions
Christian Clauss 2019-12-20 03:26:19 +01:00 committed by Kevin Chung
parent 97f5dcaf8c
commit 6d192a7c14
1 changed files with 2 additions and 2 deletions

View File

@ -15,13 +15,13 @@ from CTFd import config, create_app
from sqlalchemy_utils import ( from sqlalchemy_utils import (
drop_database, drop_database,
) )
from six.moves import input from six.moves import input, string_types
import dataset import dataset
def cast_bool(value): def cast_bool(value):
if value and value.isdigit(): if value and value.isdigit():
return int(value) return int(value)
elif value and isinstance(value, six.string_types): elif value and isinstance(value, string_types):
if value.lower() == 'true': if value.lower() == 'true':
return True return True
elif value.lower() == 'false': elif value.lower() == 'false':