Skip to content

Commit

Permalink
minor syntax improvement to use single history object as list
Browse files Browse the repository at this point in the history
  • Loading branch information
raunz committed Apr 4, 2023
1 parent 84d792a commit d27fa2a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions powerdnsadmin/routes/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -985,9 +985,7 @@ def convert_histories(histories):
detailedHistories = []
for history in histories:
if history.detail and ('add_rrsets' in history.detail or 'del_rrsets' in history.detail):
history_as_list = list()
history_as_list.append(history)
detailedHistories.append(DetailedHistory(history, extract_changelogs_from_history(history_as_list)))
detailedHistories.append(DetailedHistory(history, extract_changelogs_from_history([history])))
else:
detailedHistories.append(DetailedHistory(history, None))
return detailedHistories
Expand Down

0 comments on commit d27fa2a

Please sign in to comment.