Skip to content

Commit

Permalink
Merge pull request #1125 from AI4Bharat/minor_fix_ac_en_stage_bbm
Browse files Browse the repository at this point in the history
added fix for ac_enabled_stage
  • Loading branch information
aparna-aa authored Oct 28, 2024
2 parents 394b169 + 30a62cb commit 085b3ea
Showing 1 changed file with 54 additions and 30 deletions.
84 changes: 54 additions & 30 deletions backend/tasks/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1786,11 +1786,15 @@ def partial_update(self, request, pk=None):
request.data["result"],
annotation_obj.task,
is_acoustic_project_type,
is_acoustic_project_type
and annotation_obj.task.project_id.metadata_json[
"acoustic_enabled_stage"
]
== 1,
(
is_acoustic_project_type
and "acoustic_enabled_stage"
in annotation_obj.task.project_id.metadata_json
and annotation_obj.task.project_id.metadata_json[
"acoustic_enabled_stage"
]
== 1
),
)
else:
annotation_obj.result = request.data["result"]
Expand Down Expand Up @@ -1842,11 +1846,15 @@ def partial_update(self, request, pk=None):
request.data["result"],
annotation_obj.task,
is_acoustic_project_type,
is_acoustic_project_type
and annotation_obj.task.project_id.metadata_json[
"acoustic_enabled_stage"
]
== 1,
(
is_acoustic_project_type
and "acoustic_enabled_stage"
in annotation_obj.task.project_id.metadata_json
and annotation_obj.task.project_id.metadata_json[
"acoustic_enabled_stage"
]
== 1
),
)
annotation_status = request.data["annotation_status"]
if empty_flag == True and annotation_status in [
Expand Down Expand Up @@ -1915,11 +1923,15 @@ def partial_update(self, request, pk=None):
request.data["result"],
annotation_obj.task,
is_acoustic_project_type,
is_acoustic_project_type
and annotation_obj.task.project_id.metadata_json[
"acoustic_enabled_stage"
]
<= 2,
(
is_acoustic_project_type
and "acoustic_enabled_stage"
in annotation_obj.task.project_id.metadata_json
and annotation_obj.task.project_id.metadata_json[
"acoustic_enabled_stage"
]
<= 2
),
)
else:
annotation_obj.result = request.data["result"]
Expand Down Expand Up @@ -2010,11 +2022,15 @@ def partial_update(self, request, pk=None):
request.data["result"],
annotation_obj.task,
is_acoustic_project_type,
is_acoustic_project_type
and annotation_obj.task.project_id.metadata_json[
"acoustic_enabled_stage"
]
<= 2,
(
is_acoustic_project_type
and "acoustic_enabled_stage"
in annotation_obj.task.project_id.metadata_json
and annotation_obj.task.project_id.metadata_json[
"acoustic_enabled_stage"
]
<= 2
),
)
annotation_status = request.data["annotation_status"]
if empty_flag == True and annotation_status in [
Expand Down Expand Up @@ -2110,11 +2126,15 @@ def partial_update(self, request, pk=None):
request.data["result"],
annotation_obj.task,
is_acoustic_project_type,
is_acoustic_project_type
and annotation_obj.task.project_id.metadata_json[
"acoustic_enabled_stage"
]
<= 3,
(
is_acoustic_project_type
and "acoustic_enabled_stage"
in annotation_obj.task.project_id.metadata_json
and annotation_obj.task.project_id.metadata_json[
"acoustic_enabled_stage"
]
<= 3
),
)
else:
annotation_obj.result = request.data["result"]
Expand Down Expand Up @@ -2196,11 +2216,15 @@ def partial_update(self, request, pk=None):
request.data["result"],
annotation_obj.task,
is_acoustic_project_type,
is_acoustic_project_type
and annotation_obj.task.project_id.metadata_json[
"acoustic_enabled_stage"
]
<= 3,
(
is_acoustic_project_type
and "acoustic_enabled_stage"
in annotation_obj.task.project_id.metadata_json
and annotation_obj.task.project_id.metadata_json[
"acoustic_enabled_stage"
]
<= 3
),
)
if empty_flag == True and annotation_status in [
LABELED,
Expand Down

0 comments on commit 085b3ea

Please sign in to comment.