You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
The project_update_extra resource breaks if a project or organisation doesn't have a location.
The text was updated successfully, but these errors were encountered: