foundersandcoders / open-tourism-platform

An open platform to facilitate the creation of apps to promote local tourism and business in Nazareth
MIT License
17 stars 3 forks source link

check User owns resource throws 500 when resource doesn't have owner #162

Closed m4v15 closed 6 years ago

m4v15 commented 6 years ago

Sort of an edge case but also with Data Entry it is likely a lot of resources might be made without owners initially

m4v15 commented 6 years ago

Moved to it's own issue, left here for record sake Additionally, if the resource Id searched for is invalid it now gets thrown here (when the trying to access the resource to identify the owner) so it doesn't throw an unauthorised error, even if the user is unauthorised (as this happens before it is certain if the user is authed or not).

This is not a big deal (or a deal at all?), but just got confusing with the tests for a bit

mattlub commented 6 years ago

oops