From 8544e3ba3ff51f3c5946271a8d0317be6233792c Mon Sep 17 00:00:00 2001 From: Lee Smet Date: Thu, 31 Jul 2025 10:59:14 +0200 Subject: [PATCH] Don't manually encode jsonb values Signed-off-by: Lee Smet --- heromodels/src/db/postgres.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/heromodels/src/db/postgres.rs b/heromodels/src/db/postgres.rs index f1cfe2c..145656d 100644 --- a/heromodels/src/db/postgres.rs +++ b/heromodels/src/db/postgres.rs @@ -208,9 +208,6 @@ where fn set(&self, value: &M) -> Result<(u32, M), super::Error> { let mut con = self.pool.get().map_err(Error::from)?; - // let ser_val = serde_json::to_string(&value).map_err(Error::from)?; - let ser_val = jsonb::to_owned_jsonb(&value).map_err(Error::from)?; - if value.get_id() == 0 { // NOTE: We perform a query here since we want the returned value which has the updated ID let Some(row) = con