From 450718cc0195b518b87aca9c928585d7fe50543e Mon Sep 17 00:00:00 2001 From: Andrew Stoerkel Date: Mon, 20 May 2024 14:40:13 -0400 Subject: [PATCH] fix conditional expressions --- history/backends/postgres.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/history/backends/postgres.py b/history/backends/postgres.py index 4cca967..a877712 100644 --- a/history/backends/postgres.py +++ b/history/backends/postgres.py @@ -23,11 +23,11 @@ END IF; IF _record_snap THEN - IF _snap_of == 'OLD' THEN + IF _snap_of = 'OLD' THEN SELECT jsonb_object_agg(key, value) INTO _snapshot FROM jsonb_each(_old) WHERE key = ANY(_fields); - ELSEIF _snap_of == 'NEW' THEN + ELSEIF _snap_of = 'NEW' THEN SELECT jsonb_object_agg(key, value) INTO _snapshot FROM jsonb_each(_new) WHERE key = ANY(_fields);