mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	import_utils: Fix wrong usage of model_to_dict.
The argument `exclude` expects a `list` or `set` of field names, not a `str`. Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							0ec561ab57
						
					
				
				
					commit
					67fda5516f
				
			@@ -81,7 +81,7 @@ def build_zerver_realm(
 | 
			
		||||
        description=f"Organization imported from {other_product}!",
 | 
			
		||||
    )
 | 
			
		||||
    auth_methods = [[flag[0], flag[1]] for flag in realm.authentication_methods]
 | 
			
		||||
    realm_dict = model_to_dict(realm, exclude="authentication_methods")
 | 
			
		||||
    realm_dict = model_to_dict(realm, exclude=["authentication_methods"])
 | 
			
		||||
    realm_dict["authentication_methods"] = auth_methods
 | 
			
		||||
    return [realm_dict]
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user