From a88d9cfc196c98bd7a45c0d1728c97a1bb55aefb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Wed, 17 Jun 2020 15:14:27 +0200 Subject: [PATCH] Fix DoesNotExist error on android credentials creation In some environments, the login_service_user may not be available. Thus, we create a dedicated android user for the mobile app. See https://discuss.overhang.io/t/upgrading-to-juniper-fails-with-user-matching-query-does-not-exist/678 --- tutor/templates/hooks/lms/init | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tutor/templates/hooks/lms/init b/tutor/templates/hooks/lms/init index 07bfbd18a3..48be6f1948 100644 --- a/tutor/templates/hooks/lms/init +++ b/tutor/templates/hooks/lms/init @@ -5,12 +5,13 @@ echo "Loading settings $DJANGO_SETTINGS_MODULE" ./manage.py lms migrate # Create oauth credentials for Android application +./manage.py lms manage_user android android@openedx --staff --superuser ./manage.py lms create_dot_application \ --client-id android \ --client-secret {{ ANDROID_OAUTH2_SECRET }} \ --grant-type password \ android \ - login_service_user + android # Fix incorrect uploaded file path if [ -d /openedx/data/uploads/ ]; then