-
Notifications
You must be signed in to change notification settings - Fork 20
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
API returns true instead of NULL for last_modified_at fields #477
Comments
I think we need to run a script to populate the created and modified dates for all projects and organisations in the DB. We may still need to resolve this issue in the API as well - as I agree this is not expected behaviour, but all newly created objects should also already have these fields populated right? |
I've now updated the API to show null instead of True. For populating the fields we need to set some sort of default, since we don't know when these projects / organisations have been created. |
[#477] Empty date fields in API return null instead of True
Merged in #623 |
Test planGIVEN the API for organisation, project and project updates |
I've tested with: http://rsr.akvouat.org/api/v1/organisation/?format=json&limit=200 both of which populate The project updates API call doesn't return either of these fields |
The organisation and project resources last_modified_at fields are not populated for all objects, so some of them have a NULL value. However the API returns those fields as boolean true which is clearly incorrect in a very surprising way.
Examples: http://rsr.akvo.org/api/v1/project/1880/?format=json and http://rsr.akvo.org/api/v1/organisation/1880/?format=xml
This is not an issue with project updates since they all have a populated last_modified_at, but a fix should be checked to work for project updates too.
The text was updated successfully, but these errors were encountered: