WIP! address indexing issues that result in empty export from desktop app#321
Open
sethvincent wants to merge 1 commit into
Open
WIP! address indexing issues that result in empty export from desktop app#321sethvincent wants to merge 1 commit into
sethvincent wants to merge 1 commit into
Conversation
hackergrrl
reviewed
Nov 23, 2017
|
|
||
| doc.tags = doc.tags || {}; | ||
| const nodeId = doc.tags["osm-p2p-id"]; | ||
| let nodeId = doc.nodeId; |
Collaborator
There was a problem hiding this comment.
Can we clear this property before writing it? It will be written into the observation-link object.
| if (nodeId) { | ||
| observationDb.create(doc, opts, onObservationCreated); | ||
| } else { | ||
| createNode({ lat: doc.lat, lon: doc.lon }, function(err, node, a, b, c) { |
Collaborator
There was a problem hiding this comment.
Were a, b, c debug params?
| observationDb.create(doc, opts, onObservationCreated); | ||
| } else { | ||
| createNode({ lat: doc.lat, lon: doc.lon }, function(err, node, a, b, c) { | ||
| doc.nodeId = nodeId = node.value.k; |
Collaborator
There was a problem hiding this comment.
I don't think anything requires doc.nodeId to be set on the observation. You should be able to change this to just nodeId = node.value.k.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This switches observations to use
doc.nodeIdfor tracking the related osm node in the app.Also this fixes the issue where
osm.createNodewas not being called when needed.I've verified that
observation-linkdocuments are created with the correct values with both nodes that were imported from OSM and nodes that were created in the mobile app.When I sync to the desktop app and export, the xml export is still empty.