Guest User

Untitled

a guest
Aug 10th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. station_ids = list(CelestialObjects.objects.filter(name__icontains=<filter_str>, groupID=<station_group_id>).values_list('itemID', flat=True)[:100])
  2.  
  3. item_ids = list(Type.objects.filter(name__icontains=<filter_str>).values_list('typeID', flat=True)[:100])
  4.  
  5. query = Transactions.objects.filter( Q(stationID__in=station_ids) | Q(typeID__in=item_ids) )
Add Comment
Please, Sign In to add comment