From 4dcf3ab4dac72d58aac022483ae976ed379eb69c Mon Sep 17 00:00:00 2001 From: David Lutterkort Date: Tue, 9 Apr 2024 22:23:22 -0700 Subject: [PATCH] store: Fix check for deterministic error The check for a deterministic error in deployment::state was wrong in that it claimed that it contained a `sql::` but a query using `min` will return null when there are no rows. The query needs to say `sql::>` --- store/postgres/src/deployment.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/store/postgres/src/deployment.rs b/store/postgres/src/deployment.rs index da1deed49df..9fabd24afc0 100644 --- a/store/postgres/src/deployment.rs +++ b/store/postgres/src/deployment.rs @@ -705,9 +705,8 @@ pub fn state(conn: &mut PgConnection, id: DeploymentHash) -> Result("min(lower(block_range))")) - .first::(conn) - .optional()? + .select(sql::>("min(lower(block_range))")) + .first::>(conn)? } else { None };