We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 059f8eb commit a030bc6Copy full SHA for a030bc6
fastapi_crudrouter_mongodb/core/models/mongo_model.py
@@ -67,6 +67,8 @@ def convert_to(self, model: BaseModel):
67
return model(**new_model)
68
69
def _convert_list(self, list_to_convert: list):
70
+ if(len(list_to_convert) <= 0):
71
+ return []
72
if not isinstance(list_to_convert[0], dict):
73
return list_to_convert
74
new_list = []
0 commit comments