Skip to content

Commit

Permalink
Merge pull request #137 from AI4Bharat/dev
Browse files Browse the repository at this point in the history
Anudesh Update
  • Loading branch information
ishvindersethi22 authored Jan 9, 2025
2 parents 84eb76b + 4914f41 commit 6ce52c4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
10 changes: 6 additions & 4 deletions backend/organizations/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -967,11 +967,13 @@ def project_analytics(self, request, pk=None):
final_result = []
if projects_obj.count() != 0:
for proj in projects_obj:
proj_manager = [
manager.get_username()
for manager in proj.workspace_id.managers.all()
]
try:
proj_manager = []
if proj.workspace_id is not None:
proj_manager=[
manager.get_username()
for manager in proj.workspace_id.managers.all()
]
org_owner = proj.organization_id.created_by.get_username()
proj_manager.append(org_owner)
except:
Expand Down
16 changes: 9 additions & 7 deletions backend/tasks/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1529,14 +1529,14 @@ def partial_update(self, request, pk=None):
update_notification(annotation_obj, task)
is_revised = True
print(annotation_obj)
if "ids" in dict(request.data):
pass
# if "ids" in dict(request.data):
# pass

else:
return Response(
{"message": "key doesnot match"},
status=status.HTTP_400_BAD_REQUEST,
)
# else:
# return Response(
# {"message": "key doesnot match"},
# status=status.HTTP_400_BAD_REQUEST,
# )

elif annotation_obj.annotation_type == SUPER_CHECKER_ANNOTATION:
is_rejected = False
Expand Down Expand Up @@ -2394,6 +2394,8 @@ def get_llm_output(prompt, task, annotation, project_metadata_json):
if isinstance(project_metadata_json, str)
else project_metadata_json
)
if project_metadata and project_metadata.get("blank_response") == "True":
return ""
if prompt in [None, "Null", 0, "None", "", " "]:
return -1
intentDomain_test, lang_test, duplicate_test = False, False, False
Expand Down

0 comments on commit 6ce52c4

Please sign in to comment.