moved webui and updated poetry packages
Code Quality Pipeline / Test (push) Successful in 4m5s
CI Pipeline / Test (pull_request) Failing after 3m42s
CI Pipeline / Build and Publish (pull_request) Has been skipped

This commit is contained in:
Brian Bjarke Jensen
2024-05-20 19:19:29 +02:00
parent 72c60170a7
commit fd9140093d
54 changed files with 511 additions and 460 deletions
+30
View File
@@ -0,0 +1,30 @@
from __future__ import annotations
import logging
from pymongo.collection import Collection
from shared.dto import ModelData
def upsert_annotation(
collection: Collection,
vis_com_name: str,
annotations: ModelData,
) -> None:
"""Upserts annotation data in the database."""
query = {
'name': vis_com_name,
}
update = {
'$set': {
'annotation': annotations.model_dump(),
},
}
res = collection.update_one(
filter=query,
update=update,
upsert=True,
)
logging.info('upserted document: %s', res)
logging.info('finished')