forked from oscar.krause/fastapi-dls
main.py - migrated merged changes from dataset to sqlalchemy
This commit is contained in:
parent
c7aa28382a
commit
b5c64038cb
@ -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'],
|
||||
|
Loading…
Reference in New Issue
Block a user