Skip to content

Instantly share code, notes, and snippets.

@andymckay
Created April 12, 2011 23:32
Show Gist options
  • Save andymckay/916677 to your computer and use it in GitHub Desktop.
Save andymckay/916677 to your computer and use it in GitHub Desktop.
diff --git a/apps/editors/models.py b/apps/editors/models.py
index 58eb5d7..a6d5962 100644
--- a/apps/editors/models.py
+++ b/apps/editors/models.py
@@ -216,7 +216,10 @@ class EditorSubscription(amo.models.ModelBase):
def send_notifications(sender, instance, **kw):
- if kw.get('raw') or not kw.get('created') or instance.is_beta:
+ # Using instance.is_beta uses all_files which is heavily cached and
+ # breaks multiple unit tests.
+ if (kw.get('raw') or not kw.get('created') or
+ filter(lambda f: f.status == amo.STATUS_BETA, instance.files.all())):
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment