def clear_compatversion_cache_on_delete(sender, instance, **kw):
 try:
  if (not (instance.addon.type == amo.ADDON_EXTENSION)):
   return
 except ObjectDoesNotExist:
  return
 if (not kw.get('raw')):
  instance.addon.invalidate_d2c_versions()

def clear_compatversion_cache_on_delete ( sender , instance , ** kw ) : try : if ( not ( instance . addon . type == amo . ADDON_EXTENSION ) ) : return except ObjectDoesNotExist : return if ( not kw . get ( 'raw' ) ) : instance . addon . invalidate_d2c_versions ( )
clears compatversion cache when version deleted .