added hack to pass as pydantic model in fastapi, tests for fastapi

This commit is contained in:
collerek
2020-08-04 21:37:25 +02:00
parent 345fd227d1
commit eb99f28431
8 changed files with 282 additions and 13 deletions

View File

@ -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]