@memoize(prefix='get_excluded_in')
def get_excluded_in(region_id):
 aers = list(AddonExcludedRegion.objects.filter(region=region_id).values_list('addon', flat=True))
 geodata_qs = Q()
 region = parse_region(region_id)
 if (region in (mkt.regions.BRA, mkt.regions.DEU)):
  geodata_qs |= Q(**{('region_%s_iarc_exclude' % region.slug): True})
 if (region == mkt.regions.DEU):
  geodata_qs |= Q(**{'region_de_usk_exclude': True})
 geodata_exclusions = []
 if geodata_qs:
  geodata_exclusions = list(Geodata.objects.filter(geodata_qs).values_list('addon', flat=True))
 return set((aers + geodata_exclusions))

@ memoize ( prefix = 'get_excluded_in' ) def get_excluded_in ( region_id ) : aers = list ( AddonExcludedRegion . objects . filter ( region = region_id ) . values_list ( 'addon' , flat = True ) ) geodata_qs = Q ( ) region = parse_region ( region_id ) if ( region in ( mkt . regions . BRA , mkt . regions . DEU ) ) : geodata_qs |= Q ( ** { ( 'region_%s_iarc_exclude' % region . slug ) : True } ) if ( region == mkt . regions . DEU ) : geodata_qs |= Q ( ** { 'region_de_usk_exclude' : True } ) geodata_exclusions = [ ] if geodata_qs : geodata_exclusions = list ( Geodata . objects . filter ( geodata_qs ) . values_list ( 'addon' , flat = True ) ) return set ( ( aers + geodata_exclusions ) )
return ids of webapp objects excluded from a particular region or excluded due to geodata flags .