-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Allow empty task id and osm id for new geopoint #1774
Merged
Merged
Conversation
This file contains 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
github-actions
bot
added
enhancement
New feature or request
backend
Related to backend code
labels
Sep 10, 2024
ps: this PR doesn't affect existing feature |
Updates:
|
spwoodcock
requested changes
Sep 10, 2024
|
||
# convert empty str task_id and osm_id to None | ||
# when new entities are created task_id and osm_id will be empty | ||
if "task_id" in flattened_dict and flattened_dict["task_id"] == "": |
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.
An easier way to write this is with .get on a python dict π
if flattened_dict.get("task_id", "") == "":
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backend
Related to backend code
dependency:osm-fieldwork
Requires updates in osm-fieldwork
enhancement
New feature or request
frontend
Related to frontend code
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.
What type of PR is this? (check all applicable)
Related Issue
create_if
in XLSForm 'entities' tab to create a new Entity on geopoint uploadΒ #1730For newly created entity of geopoint of feature , there won't be
task_id
andosm_id
in entity properties resulted into validation error.Describe this PR
This PR now allows the empty
task_id
andosm_id
for new entity created when user locate new geopoint for a feature in field. It is dependent toosm-fieldwork
where xls file is updated to allow to create new entity for the gps point of new feature recorded.Screenshots
N/A
Alternative Approaches Considered
Did you attempt any other approaches that are not documented in code?
Review Guide
osm-fieldwork
Checklist before requesting a review
[optional] What gif best describes this PR or how it makes you feel?