mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	python: Replace ujson with orjson.
Fixes #6507. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							123790a72d
						
					
				
				
					commit
					61d0417e75
				
			@@ -13,7 +13,7 @@ from typing import (
 | 
			
		||||
    Union,
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
import ujson
 | 
			
		||||
import orjson
 | 
			
		||||
from django.conf import settings
 | 
			
		||||
from django.core.exceptions import ValidationError
 | 
			
		||||
from django.db import transaction
 | 
			
		||||
@@ -340,7 +340,7 @@ def compose_views(
 | 
			
		||||
            response = method(request, user_profile, **kwargs)
 | 
			
		||||
            if response.status_code != 200:
 | 
			
		||||
                raise JsonableError(response.content)
 | 
			
		||||
            json_dict.update(ujson.loads(response.content))
 | 
			
		||||
            json_dict.update(orjson.loads(response.content))
 | 
			
		||||
    return json_success(json_dict)
 | 
			
		||||
 | 
			
		||||
check_principals: Validator[Union[List[str], List[int]]] = check_union(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user