From 658fda63d363aabf0835dd61d402d9c73e07fe20 Mon Sep 17 00:00:00 2001 From: Tom Wier Date: Fri, 6 Sep 2024 13:40:49 +0300 Subject: [PATCH] fix(#144): null condition for person --- models/contacts/person.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/contacts/person.sql b/models/contacts/person.sql index f194816e..72d9f74e 100644 --- a/models/contacts/person.sql +++ b/models/contacts/person.sql @@ -13,7 +13,7 @@ SELECT contact.uuid, contact.saved_timestamp, - (couchdb.doc->>'date_of_birth')::date as date_of_birth, + NULLIF(couchdb.doc->>'date_of_birth', '')::date as date_of_birth, couchdb.doc->>'sex' as sex, couchdb.doc->>'phone' AS phone, couchdb.doc->>'alternative_phone' AS phone2,