From b5c64038cbde808d7e17182c6d27a898caa6fa5b Mon Sep 17 00:00:00 2001 From: Oscar Krause Date: Tue, 27 Dec 2022 19:05:41 +0100 Subject: [PATCH] main.py - migrated merged changes from dataset to sqlalchemy --- app/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index 4704ab1..84c5968 100644 --- a/app/main.py +++ b/app/main.py @@ -197,14 +197,14 @@ async def auth_v1_origin_update(request: Request): origin_ref = j['origin_ref'] logging.info(f'> [ update ]: {origin_ref}: {j}') - data = dict( + data = Origin( origin_ref=origin_ref, hostname=j['environment']['hostname'], guest_driver_version=j['environment']['guest_driver_version'], os_platform=j['environment']['os_platform'], os_version=j['environment']['os_version'], ) - db['origin'].upsert(data, ['origin_ref']) + Origin.create_or_update(db, data) response = { "environment": j['environment'],