Beispiel #1
0
 def should_skip(self, user, change):
     fake = copy(change)
     fake.action = Change.ACTION_ALERT
     fake.alert = Alert()
     notify = NewAlertNotificaton(None)
     return user.id in {
         user.id
         for user in notify.get_users(FREQ_INSTANT, fake)
     }
Beispiel #2
0
 def should_skip(self, user, change):
     fake = copy(change)
     fake.action = Change.ACTION_ALERT
     fake.alert = Alert()
     if self.fake_notify is None:
         self.fake_notify = NewAlertNotificaton(None, self.perm_cache)
     return bool(
         list(self.fake_notify.get_users(FREQ_INSTANT, fake, users=[user.pk]))
     )