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()
|
||||
)
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user