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,