Use a more pythonic way to compare the dicts.

This commit is contained in:
Rebecca Law
2016-06-01 13:55:04 +01:00
parent 047a7d5488
commit ec7d9b1c6e

View File

@@ -121,10 +121,7 @@ def _strip_html(content):
def _template_has_not_changed(current_data, updated_template): def _template_has_not_changed(current_data, updated_template):
if (current_data['name'] == updated_template['name'] and return all(
current_data['content'] == updated_template['content'] and current_data[key] == updated_template[key]
current_data['subject'] == updated_template['subject']and for key in ('name', 'content', 'subject', 'archived')
current_data['archived'] == updated_template['archived']): )
return True
else:
return False