Skip to content

Commit

Permalink
Merge pull request #961 from MarcHagen/patch-1
Browse files Browse the repository at this point in the history
Catch DoesNotExist preventing startup
  • Loading branch information
tobiasge committed Mar 16, 2023
2 parents ac8cb02 + 29e37a3 commit 256f23b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,12 @@ fi

./manage.py shell --interface python <<END
from users.models import Token
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.")
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."
Expand Down

0 comments on commit 256f23b

Please sign in to comment.