Merge pull request #961 from MarcHagen/patch-1
Catch DoesNotExist preventing startup
This commit is contained in:
commit
256f23b4ad
@ -84,9 +84,12 @@ fi
|
|||||||
|
|
||||||
./manage.py shell --interface python <<END
|
./manage.py shell --interface python <<END
|
||||||
from users.models import Token
|
from users.models import Token
|
||||||
old_default_token = Token.objects.get(key="0123456789abcdef0123456789abcdef01234567")
|
try:
|
||||||
if old_default_token:
|
old_default_token = Token.objects.get(key="0123456789abcdef0123456789abcdef01234567")
|
||||||
print("⚠️ Warning: You have the old default admin token in your database. This token is widely known; please remove it.")
|
if old_default_token:
|
||||||
|
print("⚠️ Warning: You have the old default admin token in your database. This token is widely known; please remove it.")
|
||||||
|
except Token.DoesNotExist:
|
||||||
|
pass
|
||||||
END
|
END
|
||||||
|
|
||||||
echo "✅ Initialisation is done."
|
echo "✅ Initialisation is done."
|
||||||
|
Loading…
Reference in New Issue
Block a user