feat: Add REST APIs for course advanced settings and course tabs
This commit adds new APIs that allow MFEs to modify a course's advanced settings and to update tab settings to show/hide/move tabs.
This commit is contained in:
committed by
Awais Jibran
parent
c2ba5e7975
commit
8cf751a405
@@ -69,4 +69,4 @@ class UsageKeyField(serializers.Field):
|
||||
try:
|
||||
return UsageKey.from_string(data)
|
||||
except InvalidKeyError as err:
|
||||
raise serializers.ValidationError("Invalid course key") from err
|
||||
raise serializers.ValidationError("Invalid usage key") from err
|
||||
|
||||
@@ -91,7 +91,7 @@ class DeveloperErrorViewMixin:
|
||||
return exc.response
|
||||
elif isinstance(exc, APIException):
|
||||
return self._make_error_response(exc.status_code, exc.detail)
|
||||
elif isinstance(exc, Http404) or isinstance(exc, ObjectDoesNotExist): # lint-amnesty, pylint: disable=consider-merging-isinstance
|
||||
elif isinstance(exc, (Http404, ObjectDoesNotExist)):
|
||||
return self._make_error_response(404, str(exc) or "Not found.")
|
||||
elif isinstance(exc, ValidationError):
|
||||
return self._make_validation_error_response(exc)
|
||||
|
||||
Reference in New Issue
Block a user