Created
April 12, 2011 23:32
-
-
Save andymckay/916677 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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