diff --git a/api/routers/sources.py b/api/routers/sources.py index 22c8624..78545e8 100644 --- a/api/routers/sources.py +++ b/api/routers/sources.py @@ -185,7 +185,7 @@ async def get_sources( query = f""" SELECT id, asset, created, title, updated, topics, command, (SELECT VALUE count() FROM source_insight WHERE source = $parent.id GROUP ALL)[0].count OR 0 AS insights_count, - ((SELECT VALUE id FROM source_embedding WHERE source = $parent.id LIMIT 1)) != NONE AS embedded + (SELECT VALUE id FROM source_embedding WHERE source = $parent.id LIMIT 1) != [] AS embedded FROM (select value in from reference where out=$notebook_id) {order_clause} LIMIT $limit START $offset @@ -204,7 +204,7 @@ async def get_sources( query = f""" SELECT id, asset, created, title, updated, topics, command, (SELECT VALUE count() FROM source_insight WHERE source = $parent.id GROUP ALL)[0].count OR 0 AS insights_count, - ((SELECT VALUE id FROM source_embedding WHERE source = $parent.id LIMIT 1)) != NONE AS embedded + (SELECT VALUE id FROM source_embedding WHERE source = $parent.id LIMIT 1) != [] AS embedded FROM source {order_clause} LIMIT $limit START $offset