Don't make empty changelog entries.

This commit is contained in:
Pieter-Jan Briers
2021-11-18 00:47:57 +01:00
parent 49151cd4cd
commit 2ef0089152

View File

@@ -61,15 +61,18 @@ def main():
"time", datetime.datetime.now(datetime.timezone.utc).isoformat()
)
changes = partyaml["changes"]
if not isinstance(changes, list):
changes = [changes]
max_id += 1
new_id = max_id
if len(changes):
# Don't add empty changelog entries...
max_id += 1
new_id = max_id
entries_list.append(
{"author": author, "time": time, "changes": changes, "id": new_id}
)
entries_list.append(
{"author": author, "time": time, "changes": changes, "id": new_id}
)
os.remove(partpath)