mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	Remove some unnecessary intermediate lists
Use generator comprehensions for efficiency and cleaner code. (imported from commit 6b4b709515b5c904ef38b8ea33a9d4a4af0f5468)
This commit is contained in:
		@@ -127,7 +127,7 @@ class Huddle(models.Model):
 | 
			
		||||
 | 
			
		||||
def get_huddle(id_list):
 | 
			
		||||
    id_list = sorted(set(id_list))
 | 
			
		||||
    hash_key = ",".join([str(x) for x in id_list])
 | 
			
		||||
    hash_key = ",".join(str(x) for x in id_list)
 | 
			
		||||
    huddle_hash = hashlib.sha1(hash_key).hexdigest()
 | 
			
		||||
    if Huddle.objects.filter(huddle_hash=huddle_hash):
 | 
			
		||||
        return Huddle.objects.get(huddle_hash=huddle_hash)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user