mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-12 06:07:56 +00:00
Fix android user creation during init
Init was crashing with error: django.db.utils.IntegrityError: (1062, "Duplicate entry 'android' for key 'client_id'") See https://discuss.overhang.io/t/reset-password-email-sent-but-activation-email-dont/690/4
This commit is contained in:
parent
b328e0f7d9
commit
f28ecca498
@ -4,6 +4,7 @@ Note: Breaking changes between versions are indicated by "💥".
|
||||
|
||||
## Unreleased
|
||||
|
||||
- [Bugfix] Fix android user creation during init
|
||||
- [Bugfix] Fix undefined settings in k8s scripts, such as `createuser`
|
||||
|
||||
## v10.0.7 (2020-06-22)
|
||||
|
@ -4,12 +4,16 @@ echo "Loading settings $DJANGO_SETTINGS_MODULE"
|
||||
|
||||
./manage.py lms migrate
|
||||
|
||||
# Delete obsolete credentials for Android application
|
||||
./manage.py lms shell -c 'from oauth2_provider.models import get_application_model
|
||||
get_application_model().objects.filter(name="android").exclude(user__username="login_service_user").delete()'
|
||||
# Create oauth credentials for Android application
|
||||
./manage.py lms create_dot_application \
|
||||
--client-id android \
|
||||
--client-secret {{ ANDROID_OAUTH2_SECRET }} \
|
||||
--grant-type password \
|
||||
--public \
|
||||
--update \
|
||||
android \
|
||||
login_service_user
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user