From d1ca73f813465de8102f79ac71dbe71d8ba320da Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Wed, 3 Jul 2019 20:56:35 +0200 Subject: [PATCH] Reset housenumber on every place update As it is a computed field, it needs to be computed from scratch to take into account any surrounding changes. Fixes #1395. --- sql/functions.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/functions.sql b/sql/functions.sql index 0cfeaf0c..2b399875 100644 --- a/sql/functions.sql +++ b/sql/functions.sql @@ -1230,6 +1230,8 @@ BEGIN END IF; --DEBUG: RAISE WARNING 'Copy over address tags'; + -- housenumber is a computed field, so start with an empty value + NEW.housenumber := NULL; IF NEW.address is not NULL THEN IF NEW.address ? 'conscriptionnumber' THEN i := getorcreate_housenumber_id(make_standard_name(NEW.address->'conscriptionnumber')); -- 2.39.5