Fixes for django 4 (remove is_ajax)
This commit is contained in:
+5
-5
@@ -449,7 +449,7 @@ def create_abnormality(request):
|
||||
|
||||
@csrf_exempt
|
||||
def get_abnormality_id(request):
|
||||
if request.is_ajax():
|
||||
if request.accepts("application/json")():
|
||||
abnormality_name = request.GET["abnormality_name"]
|
||||
abnormality_id = Abnormality.objects.get(name=abnormality_name).id
|
||||
data = {
|
||||
@@ -475,7 +475,7 @@ def create_examination(request):
|
||||
|
||||
@csrf_exempt
|
||||
def get_examination_id(request):
|
||||
if request.is_ajax():
|
||||
if request.accepts("application/json")():
|
||||
examination_name = request.GET["examination_name"]
|
||||
examination_id = Examination.objects.get(name=examination_name).id
|
||||
data = {
|
||||
@@ -501,7 +501,7 @@ def create_region(request):
|
||||
|
||||
@csrf_exempt
|
||||
def get_region_id(request):
|
||||
if request.is_ajax():
|
||||
if request.accepts("application/json")():
|
||||
region_name = request.GET["region_name"]
|
||||
region_id = Region.objects.get(name=region_name).id
|
||||
data = {
|
||||
@@ -849,7 +849,7 @@ def question_anonymise_dicom(request, pk):
|
||||
|
||||
@user_is_author_or_rapid_checker
|
||||
def question_save_annotation(request, pk):
|
||||
if request.is_ajax() and request.method == "POST":
|
||||
if request.method == "POST":
|
||||
question = get_object_or_404(Rapid, pk=pk)
|
||||
|
||||
image_annotations = json.loads(request.POST.get("annotation"))
|
||||
@@ -877,7 +877,7 @@ class ExamClone(ExamCloneMixin, ExamCreate):
|
||||
|
||||
@login_required
|
||||
def get_question_by_hash(request):
|
||||
if request.is_ajax() and request.method == "POST":
|
||||
if request.method == "POST":
|
||||
|
||||
hash = request.POST.get("hash")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user