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

project_update_extra API resource broken for certain data sets #820

Closed
zzgvh opened this issue Oct 20, 2014 · 2 comments
Closed

project_update_extra API resource broken for certain data sets #820

zzgvh opened this issue Oct 20, 2014 · 2 comments
Assignees
Labels
Milestone

Comments

@zzgvh
Copy link
Contributor

zzgvh commented Oct 20, 2014

The project_update_extra resource breaks if a project or organisation doesn't have a location.

@zzgvh zzgvh self-assigned this Oct 20, 2014
@zzgvh zzgvh added this to the 2.5 Bujumbura milestone Oct 20, 2014
@zzgvh
Copy link
Contributor Author

zzgvh commented Oct 20, 2014

I think this was not detected for some time becausegenerally organisations have had a location objects even if they aren't required. So when Joy added three Nepalese orgs without locations and in turn users of those organisations made updates things went SPLAT! No blame on Joy for this of course!
But it highlights the question if we should require locations for orgs or not. Regardless I'm posting a fix.

zzgvh added a commit that referenced this issue Oct 20, 2014
primary_location_data_for_update() in
ProjectUpdateResourceExtra.dehydrate() throws an unhandled exceltion if
the organisation or project doesn't have a primary location.

Since we don't require orgs to have a location wrap the creation of the
primary_location dics in a try-except and return None if there's no
location.
@rumca
Copy link
Contributor

rumca commented Oct 22, 2014

I've set up a test organisation which has no location information and then submitted a project update with a user who is a member of this organisation - everything worked fine. Also http://rsr.akvouat.org/api/v1/project_update_extra/?format=json call seems to return fine with the update I submitted.

Is that enough to test this fix?

@MichaelAkvo MichaelAkvo moved this to Done in RSR Dec 8, 2022
@MichaelAkvo MichaelAkvo added this to RSR Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants