mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	models: Delete get_stream_recipient function and its uses.
With recipient being now a Stream field, there's no more use for this helper function.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							0d6f78b381
						
					
				
				
					commit
					6a0b68bc7f
				
			@@ -5,8 +5,7 @@ from zerver.lib.actions import bulk_add_subscriptions, \
 | 
			
		||||
    bulk_remove_subscriptions, do_deactivate_stream
 | 
			
		||||
from zerver.lib.cache import cache_delete_many, to_dict_cache_key_id
 | 
			
		||||
from zerver.lib.management import ZulipBaseCommand
 | 
			
		||||
from zerver.models import Message, Subscription, get_stream, \
 | 
			
		||||
    get_stream_recipient
 | 
			
		||||
from zerver.models import Message, Subscription, get_stream
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def bulk_delete_cache_keys(message_ids_to_clear: List[int]) -> None:
 | 
			
		||||
@@ -34,8 +33,8 @@ class Command(ZulipBaseCommand):
 | 
			
		||||
        stream_to_keep = get_stream(options["stream_to_keep"], realm)
 | 
			
		||||
        stream_to_destroy = get_stream(options["stream_to_destroy"], realm)
 | 
			
		||||
 | 
			
		||||
        recipient_to_destroy = get_stream_recipient(stream_to_destroy.id)
 | 
			
		||||
        recipient_to_keep = get_stream_recipient(stream_to_keep.id)
 | 
			
		||||
        recipient_to_destroy = stream_to_destroy.recipient
 | 
			
		||||
        recipient_to_keep = stream_to_keep.recipient
 | 
			
		||||
 | 
			
		||||
        # The high-level approach here is to move all the messages to
 | 
			
		||||
        # the surviving stream, deactivate all the subscriptions on
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user