mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 00:41:35 -05:00
Use a more pythonic way to compare the dicts.
This commit is contained in:
@@ -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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user