-
Notifications
You must be signed in to change notification settings - Fork 81
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
Fixes #592 -- Bump jsonattrs; small style fixes #1401
Conversation
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.
Aside from the minor misspelling I noticed (see inline comment), I want to raise a general comment regarding how we treat QA for the other repos: django-jsonattrs, django-tutelary, and django-skivvy. Right now, it seems any changes to any of those repos does not really go into the same QA process we have on cadasta-platform (have 2 reviewers, put on staging for isolated testing if needed, etc.). Should we be instituting the same or a similar but lightweight QA process as well?
cadasta/xforms/views/api.py
Outdated
headers=headers, | ||
status=status, | ||
content_type=self.DEFAULT_CONTENT_TYPE) | ||
tempate_data = {'message': message} |
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.
Should this be template_data
instead of tempate_data
?
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.
It should!
I agree we should apply the same QA standards to all our libraries. I was expecting you to look at the other PR as well; implicitly when you approve this PR, you also approve the other PR. I'll add the same required checks to our other repositories and will assign people for review in the future. |
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.
Looks good other than comment on django-jsonattrs
PR.
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.
This PR and the PR in django-jsonattrs now looks good to me!
Merge pending release of Cadasta/django-jsonattrs#17 |
Released django-jsonattrs 0.1.22 and added it to the requirements, should be good to go when the tests have passed. |
Proposed changes in this pull request
Fixes #592.
GeoODK sends empty XML (
<location_problems />
) elements when no value is provided for a form field. We convert the XML into a Python dictionary using pyxform.xform2json.XFormToDict; all empty XML elements are converted to empty strings ("location_problems": ""
) or a list with one empty string ("location_problems": [""]
).This is a problem for integer, decimal, select_one and select_multiple fields because an empty string is an actual value but it's not valid for fields mentioned above because it's not a number and usually not an option for select fields.
This PR only bumps django-jsonattrs to a new version. The actual bug fix is added to django-json attrs PR #17. Please review the django-jsonattrs PR before accepting this one.
When should this PR be merged
When ready.
Risks
None/
Follow-up actions
Checklist (for reviewing)
General
migration
label if a new migration is added.Functionality
Code
Tests
Security
Documentation