added hack to pass as pydantic model in fastapi, tests for fastapi
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
from typing import Dict, Union, List
|
||||
|
||||
from sqlalchemy import text
|
||||
from orm.exceptions import RelationshipNotFound
|
||||
|
||||
|
||||
class Relationship:
|
||||
@ -41,5 +41,4 @@ class RelationshipManager:
|
||||
if rel == name:
|
||||
if relations and relations[0].fk_side == 'parent':
|
||||
return relations[0].child
|
||||
else:
|
||||
return [rela.child for rela in relations]
|
||||
return [rela.child for rela in relations]
|
||||
|
||||
Reference in New Issue
Block a user