-
Notifications
You must be signed in to change notification settings - Fork 1k
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
修复同步keep数据出现的错误 #20
修复同步keep数据出现的错误 #20
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,5 @@ db.csv | |
danpalmer.sql | ||
|
||
.mypy_cache | ||
|
||
.vscode |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ const scrollToMap = () => { | |
const locationForRun = (run) => { | ||
const location = run.location_country; | ||
let [city, province, country] = ['', '', '']; | ||
if (location) { | ||
if (location && location != "None") { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest add const countryMatch = l[l.length - 1].match(/[\u4e00-\u9fa5].*[\u4e00-\u9fa5]/) || l[2].match(/[\u4e00-\u9fa5].*[\u4e00-\u9fa5]/); There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The length of the l variable may be equal to 1, so add the logic to judge the length.
|
||
// Only for Chinese now | ||
const cityMatch = location.match(/[\u4e00-\u9fa5]*市/); | ||
const provinceMatch = location.match(/[\u4e00-\u9fa5]*省/); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to get if verticalAccuracy attr first.
if there is no value here
We do not add it to the dict.
only keep the
latitude, longitude, time
in the dictThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other props may not need to be judged to exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I'll pr again.