mirror of
https://github.com/peeringdb/peeringdb.git
synced 2024-05-11 05:55:09 +00:00
advanced search fixes (#984)
* fix advanced search error when not logged in * fix error with data/my_organizations if user is not logged in * fix 500 error when viewing advanced search as a user that is not affiliated with any org * tests for adv search init and anonymous data/my_organizations request Co-authored-by: Stefan Pratter <stefan@20c.com>
This commit is contained in:
@@ -195,6 +195,9 @@ def my_organizations(request):
|
||||
Returns a JSON response with a list of organization names and ids
|
||||
that the requesting user is a member of
|
||||
"""
|
||||
if not request.user.is_authenticated:
|
||||
return JsonResponse({"my_organizations": []})
|
||||
|
||||
return JsonResponse(
|
||||
{
|
||||
"my_organizations": [
|
||||
|
Reference in New Issue
Block a user