-
Notifications
You must be signed in to change notification settings - Fork 0
Bug fixes 3.4 #93
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
Bug fixes 3.4 #93
Conversation
@@ -29,8 +29,13 @@ const QueryRow = ({ id, condition, index, update, remove, propertyOptions, schem | |||
} else { | |||
update(index, 'property', ''); | |||
} | |||
if (schema[id].fields[condition.property].mysql_type === 'date') { | |||
if(!value) { | |||
setValue(startDate.toJSON().slice(0, 10)); |
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 would be clearer if the number 10 was assigned to a constant -- I don't understand what this parsing accomplishes.
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.
To match the value of a date field coming out of the DKAN datastore we have to match YYYY-MM-DD
. This is the JSON format, but JavaScript adds all the the :HH:MM
... to it so the slice is there to get the the first part. It will never change that I know of which is why I didn't set it as a variable. When data dictionaries are finally in DKAN we might need to revisit if there are different date types. Right now this only exists for a specific set of datasets on Data.Medicaid.
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.
lgtm
Various bug fixes from the backlog.