Make sure that discovery migrations work even when LMS_HOST=localhost

We adopt here a similar solution than the one we used with the LMS.

This is for https://github.com/overhangio/tutor/issues/325
This commit is contained in:
Régis Behmo 2020-05-13 14:43:34 +02:00
parent 5fe5159be7
commit 7688bb4012
2 changed files with 3 additions and 1 deletions

View File

@ -1 +1 @@
__version__ = "0.1.16"
__version__ = "0.1.17"

View File

@ -24,6 +24,7 @@ make migrate
--oidc-key "{{ DISCOVERY_OAUTH2_KEY_DEV }}" \
--oidc-secret "{{ DISCOVERY_OAUTH2_SECRET }}"
{% if DISCOVERY_HOST != "discovery.localhost" %}
# Production partner
./manage.py create_or_update_partner \
--site-id 2 \
@ -33,6 +34,7 @@ make migrate
--oidc-url-root "{% if ACTIVATE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}/oauth2" \
--oidc-key "{{ DISCOVERY_OAUTH2_KEY }}" \
--oidc-secret "{{ DISCOVERY_OAUTH2_SECRET }}"
{% endif %}
./manage.py refresh_course_metadata --partner_code=dev
./manage.py update_index --disable-change-limit