fix: correct PostgreSQL device row mapping
This commit is contained in:
parent
2683b65ffc
commit
ba2dccff57
9
app.py
9
app.py
@ -110,6 +110,7 @@ def load_or_create_device(
|
||||
VALUES (%s, %s, %s, %s)
|
||||
RETURNING
|
||||
id,
|
||||
organization_id,
|
||||
device_fingerprint,
|
||||
hostname,
|
||||
created_at,
|
||||
@ -129,10 +130,10 @@ def load_or_create_device(
|
||||
device = {
|
||||
"id": str(row[0]),
|
||||
"organization_id": str(row[1]),
|
||||
"device_fingerprint": row[1],
|
||||
"hostname": row[2],
|
||||
"created_at": row[3].isoformat(),
|
||||
"last_seen": row[4].isoformat(),
|
||||
"device_fingerprint": row[2],
|
||||
"hostname": row[3],
|
||||
"created_at": row[4].isoformat(),
|
||||
"last_seen": row[5].isoformat(),
|
||||
}
|
||||
|
||||
return device, created
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user