From 5238d70443148eb7145387996baa5871f585e4f5 Mon Sep 17 00:00:00 2001 From: Rob Hudson Date: Mon, 23 Jul 2012 12:54:21 -0700 Subject: [PATCH] Only perform d2c cache bumps for extensions --- apps/versions/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/versions/models.py b/apps/versions/models.py index d28aa5bf2e..cb22eecd87 100644 --- a/apps/versions/models.py +++ b/apps/versions/models.py @@ -438,12 +438,18 @@ def cleanup_version(sender, instance, **kw): def clear_compatversion_cache_on_save(sender, instance, created, **kw): """Clears compatversion cache if new Version created.""" + if not instance.addon.type == amo.ADDON_EXTENSION: + return + if not kw.get('raw') and created: instance.addon.invalidate_d2c_versions() def clear_compatversion_cache_on_delete(sender, instance, **kw): """Clears compatversion cache when Version deleted.""" + if not instance.addon.type == amo.ADDON_EXTENSION: + return + if not kw.get('raw'): instance.addon.invalidate_d2c_versions()