Keep variable in list comprehension from shadowing

(imported from commit 2d2bbc029d7c13b5e6f125bd5f79ba3d73d3c677)
This commit is contained in:
Leo Franchi 2013-07-02 11:55:45 -04:00
parent 1be1cb121c
commit 93765b0568
1 changed files with 1 additions and 1 deletions

View File

@ -702,7 +702,7 @@ class NarrowBuilder(object):
# (unsocial, ununsocial, social.d, etc)
matching_streams = Stream.objects.filter(realm=self.user_profile.realm,
name__iregex=r'"^(un)*%s(.d)*$' % (re.escape(stream.name),))
matching_stream_ids = [stream.id for stream in matching_streams]
matching_stream_ids = [matching_stream.id for matching_stream in matching_streams]
recipients = bulk_get_recipients(Recipient.STREAM, matching_stream_ids).values()
return self.pQ(recipient__in=recipients)