Skip to content

Commit

Permalink
Preserve 'opening_hours' too
Browse files Browse the repository at this point in the history
re: osmlab/name-suggestion-index#10170 (comment)

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.
  • Loading branch information
bhousel committed Nov 29, 2024
1 parent 5e8376e commit b1f2c3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/services/NsiService.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ export class NsiService extends AbstractSystem {
// Preserve some tags that we specifically don't want NSI to overwrite. ('^name', sometimes)
let preserveTags = item.preserveTags || properties.preserveTags || [];

// These tags can be toplevel tags -or- attributes - so we generally want to preserve existing values - iD#8615
// These tags are worth preserving too - see iD#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}$`);
});

Expand Down

0 comments on commit b1f2c3f

Please sign in to comment.