diff --git a/dds_web/utils.py b/dds_web/utils.py index b2f8e82e1..80a40ff1a 100644 --- a/dds_web/utils.py +++ b/dds_web/utils.py @@ -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: diff --git a/tests/test_utils.py b/tests/test_utils.py index 18153e0e0..233704e2a 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -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 == {}