All pastes #2055722 Raw Edit

Unnamed

public python v1 · immutable
#2055722 ·published 2011-05-09 12:46 UTC
rendered paste body
        def get_friends_who_like(self, mov):		print "inside"		try:			fr = self.get_friends()			ids = []			for f in fr:				z = User.objects.filter(uid=f['id'])				if len(z) > 0:					ids.append(z[0])						ans = User.objects.filter(vote__user__in = ids, vote__movie__mid = mov.mid, vote__rating = 1)                        print "returning length: ", len(ans)			return ans		except Exception, e:			logging.exception(e)			return []