Skip to content

Conversation

rubickcz
Copy link
Member

@rubickcz rubickcz commented Jul 23, 2020

This PR allows to set an admin template as inactive, which effectively disables creation of new notifications for given type (template slug). The flag can be easily set from administration, since it's located directly on model.

@rubickcz rubickcz force-pushed the add_option_to_deactivate_admin_template branch 2 times, most recently from 66f7502 to e8b3683 Compare July 23, 2020 14:17
@rubickcz rubickcz requested a review from matllubos July 23, 2020 14:19
@rubickcz rubickcz force-pushed the add_option_to_deactivate_admin_template branch from e8b3683 to 641cf74 Compare July 23, 2020 14:33
Returns ``True`` if handler should handle creating of notification(s).
"""
return True
return not self._admin_template or self._admin_template and self._admin_template.is_active
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there can be

not self._admin_template or self._admin_template.is_active

the middle part is not required

@rubickcz rubickcz force-pushed the add_option_to_deactivate_admin_template branch from 641cf74 to 2071aa1 Compare July 27, 2020 00:19
@rubickcz rubickcz merged commit 033a23f into druids:master Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants