diff --git a/pmodules_tools/db_diff/check.py b/pmodules_tools/db_diff/check.py index 4a135e7f..7686f53e 100644 --- a/pmodules_tools/db_diff/check.py +++ b/pmodules_tools/db_diff/check.py @@ -21,14 +21,14 @@ def asciidoc_json_dump(list, name, steps, Pmodules_db_path): if name != "all": with open(db_file, "r") as f: matrix_db = json.load(f) - temp_matrix_db = matrix_db.copy() - for elem in matrix_db: - if ( - datetime.strptime(elem[-1], "%Y-%m-%d") + timedelta(days=30) - < datetime.now() - ): - temp_matrix_db.remove(elem) - matrix_db = temp_matrix_db + temp_matrix_db = matrix_db.copy() + for elem in matrix_db: + if ( + datetime.strptime(elem[-1], "%Y-%m-%d") + timedelta(days=30) + < datetime.now() + ): + temp_matrix_db.remove(elem) + matrix_db = temp_matrix_db # Update the database for new changes if len(list) != 0: