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 validation for resource fields using preset datetime_tz #435

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

solita-ijunnone
Copy link

Validation for resource fields using the preset datetime_tz does not work. For datasets the validation works fine.

Let's say I have a field called start_time under a resource using the preset datetime_tz. Submitting this field (or more accurately the three fields for date, time and tz which it gets split into) from the form will result in three different fields being saved in the database under extras: start_time_time, start_time_date and start_time_tz. This happens because the keys for resources are different in the data passed from the form to the validator method compared to the keys used for datasets.

This pull request contains a fix to the validator as well as a test case. Please make suggestions or corrections if there is a better or more appropriate way to solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant