minor syntax improvement to use single history object as list

This commit is contained in:
Rauno Tuul 2023-04-04 22:27:21 +03:00
parent 84d792ac07
commit d27fa2aa96

View File

@ -985,9 +985,7 @@ def convert_histories(histories):
detailedHistories = [] detailedHistories = []
for history in histories: for history in histories:
if history.detail and ('add_rrsets' in history.detail or 'del_rrsets' in history.detail): if history.detail and ('add_rrsets' in history.detail or 'del_rrsets' in history.detail):
history_as_list = list() detailedHistories.append(DetailedHistory(history, extract_changelogs_from_history([history])))
history_as_list.append(history)
detailedHistories.append(DetailedHistory(history, extract_changelogs_from_history(history_as_list)))
else: else:
detailedHistories.append(DetailedHistory(history, None)) detailedHistories.append(DetailedHistory(history, None))
return detailedHistories return detailedHistories