fix #8

Merged
emmatveev merged 1 commits from master into dev 2024-11-24 13:05:02 +03:00
2 changed files with 2 additions and 0 deletions

View File

@ -35,4 +35,5 @@ async def get(project: str, stage: str) -> list[Config]:
result = [] result = []
async for item in collection.find({'stage': stage, 'project': project}): async for item in collection.find({'stage': stage, 'project': project}):
result.append(Config.model_validate(item)) result.append(Config.model_validate(item))
result[-1]._id = item['_id']
return result return result

View File

@ -36,4 +36,5 @@ async def get(project: str, stage: str) -> list[Experiment]:
result = [] result = []
async for item in collection.find({'stage': stage, 'project': project}): async for item in collection.find({'stage': stage, 'project': project}):
result.append(Experiment.model_validate(item)) result.append(Experiment.model_validate(item))
result[-1]._id = item['_id']
return result return result