Skip to content

Commit

Permalink
typo for file submission operations
Browse files Browse the repository at this point in the history
Co-authored-by: Joonatan Mäkinen <85632655+csc-jm@users.noreply.github.com>
  • Loading branch information
blankdots and csc-jm committed Nov 30, 2022
1 parent d28cda2 commit 6058bdf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions metadata_backend/api/handlers/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ async def put_submission_path(self, req: Request) -> Response:
JSONValidator(submission, "submission").validate
for file in data:
if "accessionId" not in file:
reason = f"Updating {submission_id} failed files requires accessionId."
reason = f"Updating {submission_id} failed. Files require an accessionId."
LOG.error(reason)
raise web.HTTPBadRequest(reason=reason)
_file_accessionId = file.pop("accessionId")
Expand Down Expand Up @@ -396,7 +396,7 @@ async def delete_submission_files(self, req: Request) -> Response:
Body needs to contain a list of accessionId for files.
:param req: POST request with metadata schema in the body
:param req: DELETE request
:returns: HTTP No Content response
"""
submission_id = req.match_info["submissionId"]
Expand Down
4 changes: 2 additions & 2 deletions metadata_backend/database/db_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ async def remove(self, collection: str, accession_id: str, data_to_be_removed: U
:param accession_id: ID of the object/submission/user to be updated
:param data_to_be_removed: str or JSON representing the data that should be
updated to removed.
:returns: JSON after remove if operaation was successful
:returns: JSON after remove if operation was successful
"""
id_key = self._get_id_key(collection)
find_by_id = {id_key: accession_id}
Expand Down Expand Up @@ -314,7 +314,7 @@ async def append(
:param data_to_be_addded: str or JSON representing the data that should be
updated to removed.
:param upsert: If the document does not exist add it
:returns: JSON after remove if operaation was successful
:returns: JSON after remove if operation was successful
"""
id_key = self._get_id_key(collection)
find_by_id = {id_key: accession_id}
Expand Down

0 comments on commit 6058bdf

Please sign in to comment.