Created
January 19, 2012 23:42
-
-
Save andymckay/1643766 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/api/views.py b/apps/api/views.py | |
index 02296b7..198d3a9 100644 | |
--- a/apps/api/views.py | |
+++ b/apps/api/views.py | |
@@ -219,7 +219,10 @@ class AddonDetailView(APIView): | |
def process_request(self, addon_id): | |
try: | |
- addon = Addon.objects.id_or_slug(addon_id).get() | |
+ # untested! | |
+ addon = (Addon.objects.id_or_slug(addon_id) | |
+ .filter(disabled_by_user=False) | |
+ .get()) | |
except Addon.DoesNotExist: | |
return self.render_msg('Add-on not found!', ERROR, status=404, | |
mimetype=self.mimetype) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment