fix prisma underflow

This commit is contained in:
keyan 2023-07-06 17:25:20 -05:00
parent 0c51309520
commit e71e34612c
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ async function getGraph (models) {
FROM user_pair FROM user_pair
WHERE b_id <> ANY (${SEEDS}) WHERE b_id <> ANY (${SEEDS})
UNION ALL UNION ALL
SELECT a_id AS id, seed_id AS oid, ${MAX_TRUST}::float/ARRAY_LENGTH(${SEEDS}::int[], 1) as trust SELECT a_id AS id, seed_id AS oid, ${MAX_TRUST}::numeric/ARRAY_LENGTH(${SEEDS}::int[], 1) as trust
FROM user_pair, unnest(${SEEDS}::int[]) seed_id FROM user_pair, unnest(${SEEDS}::int[]) seed_id
GROUP BY a_id, a_total, seed_id GROUP BY a_id, a_total, seed_id
) )