Skip to content

Commit 15e3495

Browse files
committed
Changes to be committed:
modified: biocompute/apis.py
1 parent bd1a4d8 commit 15e3495

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

biocompute/apis.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,8 @@ class ValidateBcoApi(APIView):
752752
200: "All BCO validations are successful.",
753753
207: "Some or all BCO validations failed. Each object submitted"
754754
" will have it's own response object with it's own status"
755-
" message:\n",
756-
400: "All BCO validations failed."
755+
" message:\n"
756+
400: "Bad request."
757757
},
758758
tags=["BCO Management"],
759759
)
@@ -767,8 +767,6 @@ def post(self, request):
767767
data = legacy_api_converter(data=request.data)
768768

769769
for index, object in enumerate(data):
770-
# import pdb; pdb.set_trace()
771-
response_id = object.get("object_id", index)
772770
bco_results = validator.parse_and_validate(bco=object)
773771
identifier, results = bco_results.popitem()
774772

@@ -784,20 +782,14 @@ def post(self, request):
784782
message = "BCO valid"
785783

786784
response_data.append(response_constructor(
787-
identifier = response_id,
785+
identifier = identifier,
788786
status=bco_status,
789787
code=status_code,
790788
message=message,
791789
data=results
792790
))
793-
794-
if accepted_requests is False and rejected_requests == True:
795-
return Response(
796-
status=status.HTTP_207_MULTI_STATUS,
797-
data=response_data
798-
)
799791

800-
if accepted_requests is True and rejected_requests is True:
792+
if rejected_requests is True:
801793
return Response(
802794
status=status.HTTP_207_MULTI_STATUS,
803795
data=response_data

0 commit comments

Comments
 (0)