From b3579d6c7cdd7abac742e04b0cb4079a252a54a1 Mon Sep 17 00:00:00 2001 From: Dimitar <19364673+Dimitar5555@users.noreply.github.com> Date: Fri, 29 Nov 2024 20:28:31 +0200 Subject: [PATCH] Preserve 'opening_hours' when matching with NSI re: https://github.com/osmlab/name-suggestion-index/issues/10170#issuecomment-2508129832 re: https://github.com/facebook/Rapid/commit/b1f2c3f4d059663345f3d06d88aeca8139656eb0 These are tags that we want to leave alone (i.e. not offer an "upgrade") if they already have a value. We assume the mapper knows best. --- modules/services/nsi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/services/nsi.js b/modules/services/nsi.js index bd1702416..cff088713 100644 --- a/modules/services/nsi.js +++ b/modules/services/nsi.js @@ -581,7 +581,7 @@ function _upgradeTags(tags, loc) { // These tags can be toplevel tags -or- attributes - so we generally want to preserve existing values - #8615 // We'll only _replace_ the tag value if this tag is the toplevel/defining tag for the matched item (`k`) - ['building', 'emergency', 'internet_access', 'takeaway'].forEach(osmkey => { + ['building', 'emergency', 'internet_access', 'opening_hours', 'takeaway'].forEach(osmkey => { if (k !== osmkey) preserveTags.push(`^${osmkey}$`); });