Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed leading semicolon and duplicate values for floor & level tags #698

Closed
wants to merge 1 commit into from

Conversation

lihongman
Copy link

While looking around and testing, the semicolon issue also occurs in the levels field and can pop up when a previously existing (when saved) floor value is manually typed in after deselecting the equivalent radio button.

Issue comes from floor objects where null/ and / are different objects which can occur when manually adding floor/levels and deselecting radio buttons as was shown in the bug report.

Duplicate values in both level and floor fields appears due to same issue.

Fixes #639

@Zverik
Copy link
Owner

Zverik commented Apr 15, 2024

Herman, first, thanks for the pull request! The reason I'm not merging it is that toSet() call would mess up the order and the relation of two lists of values. Currently if we have level=0;1 and addr:floor=C;A, we can be sure level=0 means floor=C. The order is important. And if we delete some of values, e.g. level=0;1;2, addr:floor=C;A;A, then we cannot be sure what's the corresponding floor is the level=2. Or level=0 — which one was omitted even. Omissions are recorded by having empty values in lists, e.g. addr:floor=C;;A.

The issue is clearly with not enough tests. I'm planning to write more. Just didn't have the time.

@lihongman
Copy link
Author

Ah, kinda forgot about I had this up. Got it, hopefully what I tried doing at least provided some extra context on the bug.

@Zverik Zverik closed this Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Editor adds "level=0;0"
2 participants