Skip to content
This repository has been archived by the owner on Jul 24, 2018. It is now read-only.

Commit

Permalink
Add a new can_send property.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Aug 28, 2014
1 parent d6eeac2 commit f028ce0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fmn/lib/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,10 @@ def __repr__(self):
return "<fmn.lib.models.Preference: %r %r>" % (
self.openid, self.context_name)

@property
def can_send(self):
return self.enabled and bool(self.detail_values)

@property
def should_batch(self):
""" If the user has any batching preferences at all, then we should """
Expand Down

0 comments on commit f028ce0

Please sign in to comment.