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
|
||||
from users.models import Token
|
||||
try:
|
||||
old_default_token = Token.objects.get(key="0123456789abcdef0123456789abcdef01234567")
|
||||
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
|
||||
|
||||
echo "✅ Initialisation is done."
|
||||
|
Loading…
Reference in New Issue
Block a user