fix up BDD tests for postcode changes

Includes smaller code fixes found by the tests.
This commit is contained in:
Sarah Hoffmann
2022-06-17 17:28:51 +02:00
parent 37b2c6a830
commit 0f00f4968c
4 changed files with 9 additions and 59 deletions

View File

@@ -320,6 +320,11 @@ BEGIN
location := ROW(null, null, null, hstore('ref', place.postcode), 'place',
'postcode', null, null, false, true, 5, 0)::addressline;
RETURN NEXT location;
ELSEIF place.address is not null and place.address ? 'postcode'
and not place.address->'postcode' SIMILAR TO '%(,|;)%' THEN
location := ROW(null, null, null, hstore('ref', place.address->'postcode'), 'place',
'postcode', null, null, false, true, 5, 0)::addressline;
RETURN NEXT location;
END IF;
RETURN;