Smallfix: Fixed minor syntax error

remotes/origin/enhancement/email-actions
David Barragán Merino 2013-07-16 12:09:02 +02:00
parent 63316366ff
commit 066ed5124d
1 changed files with 8 additions and 13 deletions

View File

@ -56,7 +56,6 @@ class WatcherMixin(object):
class WatchedMixin(object):
class Meta:
abstract = True
@ -70,8 +69,7 @@ class WatchedMixin(object):
def complete_change(self):
changed_attributes = self._get_changed_attributes()
del self._changer
del self._saved_attributes
self.cancel_change()
watched_changed.send(sender=self, changed_attributes=changed_attributes)
def get_watchers_to_notify(self):
@ -79,23 +77,20 @@ class WatchedMixin(object):
watchers_by_role = self._get_watchers_by_role()
owner = watchers_by_role.get('owner')
if owner \
and owner.allow_notify_owned() \
and owner.allow_notify_by_me(self._changer):
if (owner and owner.allow_notify_owned()
and owner.allow_notify_by_me(self._changer)):
watchers_to_notify.add(owner)
assigned_to = watchers_by_role.get('assigned_to')
if (assigned_to
and assigned_to.allow_notify_assigned_to()
if (assigned_to and assigned_to.allow_notify_assigned_to()
and assigned_to.allow_notify_by_me(self._changer)):
watchers_to_notify.add(assigned_to)
suscribed_watchers = watchers_by_role.get('suscribed_watchers')
if suscribed_watchers:
for suscribed_watcher in suscribed_watchers:
if suscribed_watcher \
and suscribed_watcher.allow_notify_suscribed() \
and suscribed_watcher.allow_notify_by_me(self._changer):
if (suscribed_watcher and suscribed_watcher.allow_notify_suscribed()
and suscribed_watcher.allow_notify_by_me(self._changer)):
watchers_to_notify.add(suscribed_watcher)
#(project, project_owner) = watchers_by_role.get('project_owner')