Skip to content
Snippets Groups Projects
Unverified Commit 8d9a2c92 authored by David Ormsbee's avatar David Ormsbee Committed by GitHub
Browse files

Merge pull request #24575 from edx/ormsbee/non-atomic-course-blocks

Make Blocks API and Dates mobile views non-atomic.
parents bdcb806a 96ea413a
Branches
Tags
No related merge requests found
......@@ -5,7 +5,9 @@ CourseBlocks API views
import six
from django.core.exceptions import ValidationError
from django.db import transaction
from django.http import Http404
from django.utils.decorators import method_decorator
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey
from rest_framework.generics import ListAPIView
......@@ -21,6 +23,7 @@ from .forms import BlockListGetForm
@view_auth_classes()
@method_decorator(transaction.non_atomic_requests, name='dispatch')
class BlocksView(DeveloperErrorViewMixin, ListAPIView):
"""
**Use Case**
......
......@@ -3,9 +3,11 @@ Fragment for rendering the course dates sidebar.
"""
from django.db import transaction
from django.http import Http404
from django.template.loader import render_to_string
from django.urls import reverse
from django.utils.decorators import method_decorator
from django.utils.translation import get_language_bidi
from opaque_keys.edx.keys import CourseKey
from web_fragments.fragment import Fragment
......@@ -47,6 +49,7 @@ class CourseDatesFragmentView(EdxFragmentView):
return dates_fragment
@method_decorator(transaction.non_atomic_requests, name='dispatch')
class CourseDatesFragmentMobileView(CourseDatesFragmentView):
"""
A course dates fragment to show dates on mobile apps.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment