File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -280,7 +280,7 @@ def cleanup_handler(sig, frame):
280280 def schedule_cleanup ():
281281 task = asyncio .create_task (self ._async_cleanup ())
282282 # Shield the task to prevent it from being cancelled
283- shielded = asyncio .shield (task )
283+ asyncio .shield (task )
284284 # We don't need to await here since we're in call_soon_threadsafe
285285
286286 loop .call_soon_threadsafe (schedule_cleanup )
Original file line number Diff line number Diff line change @@ -840,7 +840,7 @@ def transform_url_strings_to_ids(schema):
840840 return transform_model (schema )
841841
842842
843- def transform_model (model_cls , path = [] ):
843+ def transform_model (model_cls , path = None ):
844844 """
845845 Recursively transforms a Pydantic model by replacing URL fields with numeric fields.
846846
@@ -851,6 +851,9 @@ def transform_model(model_cls, path=[]):
851851 Returns:
852852 Tuple of (transformed_model_cls, url_paths)
853853 """
854+ if path is None :
855+ path = []
856+
854857 # Get model fields based on Pydantic version
855858 try :
856859 # Pydantic V2 approach
You can’t perform that action at this time.
0 commit comments