Don't make empty changelog entries.
This commit is contained in:
@@ -61,15 +61,18 @@ def main():
|
|||||||
"time", datetime.datetime.now(datetime.timezone.utc).isoformat()
|
"time", datetime.datetime.now(datetime.timezone.utc).isoformat()
|
||||||
)
|
)
|
||||||
changes = partyaml["changes"]
|
changes = partyaml["changes"]
|
||||||
|
|
||||||
if not isinstance(changes, list):
|
if not isinstance(changes, list):
|
||||||
changes = [changes]
|
changes = [changes]
|
||||||
|
|
||||||
max_id += 1
|
if len(changes):
|
||||||
new_id = max_id
|
# Don't add empty changelog entries...
|
||||||
|
max_id += 1
|
||||||
|
new_id = max_id
|
||||||
|
|
||||||
entries_list.append(
|
entries_list.append(
|
||||||
{"author": author, "time": time, "changes": changes, "id": new_id}
|
{"author": author, "time": time, "changes": changes, "id": new_id}
|
||||||
)
|
)
|
||||||
|
|
||||||
os.remove(partpath)
|
os.remove(partpath)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user