diff --git a/src/app/generator.py b/src/app/generator.py index dc3c540..dc58886 100644 --- a/src/app/generator.py +++ b/src/app/generator.py @@ -50,7 +50,7 @@ class ReleaseApi(Api): # At last join the current tag to an index file index_path = join(path, f'{repository_name}.json') - index = read_json(index_path) + index = read_json(index_path, []) if tag not in index: # TODO: Check if there a better way to do this index.append(tag) # Add the current tag to the index diff --git a/src/app/utils.py b/src/app/utils.py index 2cb34d8..643bdf2 100644 --- a/src/app/utils.py +++ b/src/app/utils.py @@ -8,7 +8,7 @@ def write_json(text: str | dict | list, to, overwrite=True): text = json.dumps(text) f.write(text) -def read_json(path, default=[]): +def read_json(path, default): if os.path.exists(path): with open(path, 'r') as f: return json.load(f)