diff --git a/CHANGELOG.md b/CHANGELOG.md index c8de49e28e..e169d20b0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/tutor/templates/hooks/lms/init b/tutor/templates/hooks/lms/init index c91a2139b0..f7db997931 100644 --- a/tutor/templates/hooks/lms/init +++ b/tutor/templates/hooks/lms/init @@ -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