Skip to content

Commit

Permalink
fix: init task error
Browse files Browse the repository at this point in the history
Close #59.
  • Loading branch information
regisb committed Dec 11, 2023
1 parent 0198510 commit 9d44b89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelog.d/20231211_115338_regis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Bugfix] Fix error during init task: "'tuple object' has no attribute 'name'". (by @regisb)
8 changes: 4 additions & 4 deletions tutorecommerce/templates/ecommerce/tasks/ecommerce/init
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
./manage.py migrate --noinput
./manage.py oscar_populate_countries --initial-only

{% for app in iter_mfes() %}
{% if app["name"] == "payment" %}
{% for app_name, app in iter_mfes() %}
{% if app_name == "payment" %}
./manage.py create_or_update_site \
--site-id=1 \
--site-domain={{ ECOMMERCE_HOST }}:8130 \
Expand All @@ -21,7 +21,7 @@
--payment-support-url="http://{{ LMS_HOST }}:8000/support" \
--discovery_api_url=http://{{ DISCOVERY_HOST }}:8381/api/v1/ \
--enable-microfrontend-for-basket-page=true \
--payment-microfrontend-url="http://{{ MFE_HOST }}:{{ app['port'] }}/{{ app['name'] }}"
--payment-microfrontend-url="http://{{ MFE_HOST }}:{{ app['port'] }}/{{ app_name }}"

# Production site
./manage.py create_or_update_site \
Expand All @@ -43,7 +43,7 @@
--payment-support-url="{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}/support" \
--discovery_api_url={% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ DISCOVERY_HOST }}/api/v1/ \
--enable-microfrontend-for-basket-page=true \
--payment-microfrontend-url="{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ MFE_HOST }}/{{ app['name'] }}"
--payment-microfrontend-url="{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ MFE_HOST }}/{{ app_name }}"
{% endif %}
{% endfor %}

Expand Down

0 comments on commit 9d44b89

Please sign in to comment.