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.
This commit is contained in:
Sarah Hoffmann
2019-07-03 20:56:35 +02:00
parent cdc7d0fe0e
commit d1ca73f813

View File

@@ -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'));