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

Fix ref tag case sensitivity #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions conflate/data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import math
from requests.structures import CaseInsensitiveDict
from . import etree


Expand All @@ -9,8 +10,9 @@ def __init__(self, pid, lat, lon, tags=None, category=None, remarks=None, region
self.id = str(pid)
self.lat = lat
self.lon = lon
self.tags = {} if tags is None else {
k.lower(): str(v).strip() for k, v in tags.items() if v is not None}
self.tags = CaseInsensitiveDict({
tag: str(value).strip() for tag, value in tags.items() if value is not None
})
self.category = category
self.dist_offset = 0
self.remarks = remarks
Expand Down