Feb 20 22:12:35 OpenEdX4 [service_variant=lms][django.request][env:sandbox] ERROR [OpenEdX4 3812] [base.py:256] - Internal Server Error: /courses/course-v1:mycourseid/about
Traceback (most recent call last):
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
return func(*args, **kwargs)
File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/edx/app/edxapp/edx-platform/common/djangoapps/util/views.py", line 49, in inner
response = view_func(request, *args, **kwargs)
File "/edx/app/edxapp/edx-platform/common/djangoapps/util/cache.py", line 83, in wrapper
return view_func(request, *args, **kwargs)
File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/views/views.py", line 762, in course_about
registration_price, course_price = get_course_prices(course)
File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/views/views.py", line 607, in get_course_prices
settings.PAID_COURSE_REGISTRATION_CURRENCY[0]
File "/edx/app/edxapp/edx-platform/common/djangoapps/course_modes/models.py", line 649, in min_course_price_for_currency
return min(mode.min_price for mode in modes if mode.currency.lower() == currency.lower())
ValueError: min() arg is an empty sequence
@classmethod
def min_course_price_for_currency(cls, course_id, currency):
"""
Returns the minimum price of the course in the appropriate currency over all the course's
non-expired modes.
If there is no mode found, will return the price of DEFAULT_MODE, which is 0
"""
modes = cls.modes_for_course(course_id)
if modes:
return min(mode.min_price for mode in modes if mode.currency.lower() == currency.lower())
return cls.DEFAULT_MODE
@classmethod
def min_course_price_for_currency(cls, course_id, currency):
"""
Returns the minimum price of the course in the appropriate currency over all the course's
non-expired modes.
If there is no mode found, will return the price of DEFAULT_MODE, which is 0
"""
modes = cls.modes_for_course(course_id)
for mode in modes:
if mode.currency.lower() == currency.lower() and mode.min_price:
return mode.min_price
return 0
--
***Please note! This Google Group has been deprecated - visit https://discuss.openedx.org/
---
You received this message because you are subscribed to a topic in the Google Groups "General Open edX discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/edx-code/sB_ZPfqee2U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to edx-code+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/121602ba-6bb1-4b7a-ad8a-0edbbdd7e9dfo%40googlegroups.com.