Skip to content

Commit

Permalink
additional assert
Browse files Browse the repository at this point in the history
  • Loading branch information
i-oden committed Oct 30, 2023
1 parent b59be80 commit 83e17fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions dds_web/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,7 @@ def add_uploaded_files_to_db(proj_in_db, log: typing.Dict):
if overwrite:
try:
new_file_version(existing_file=file_object, new_info=vals)
files_added.append(file_object)
except KeyError as err:
errors[file] = {"error": f"Missing key: {err}"}
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1875,7 +1875,7 @@ def test_add_uploaded_files_to_db_correct_failed_op_file_is_found_in_db_overwrit
assert file.public_key == log[file_name]["public_key"]
assert file.salt == log[file_name]["salt"]
assert file.checksum == log[file_name]["checksum"]
assert files_added
assert files_added and file in files_added

assert errors == {}

Expand Down

0 comments on commit 83e17fc

Please sign in to comment.