don't fail if hidden is not set
This commit is contained in:
parent
034b448846
commit
512f07400d
3 changed files with 3 additions and 3 deletions
|
@ -99,7 +99,7 @@ def findCollections(request, data):
|
||||||
else:
|
else:
|
||||||
qs = _order_query(query['qs'], query['sort'])
|
qs = _order_query(query['qs'], query['sort'])
|
||||||
|
|
||||||
if is_personal and request.user.profile.ui['hidden']['collections']:
|
if is_personal and request.user.profile.ui.get('hidden', {}).get('collections'):
|
||||||
qs = qs.exclude(name__in=request.user.profile.ui['hidden']['collections'])
|
qs = qs.exclude(name__in=request.user.profile.ui['hidden']['collections'])
|
||||||
|
|
||||||
response = json_response()
|
response = json_response()
|
||||||
|
|
|
@ -425,7 +425,7 @@ def findEdits(request, data):
|
||||||
else:
|
else:
|
||||||
qs = _order_query(query['qs'], query['sort'])
|
qs = _order_query(query['qs'], query['sort'])
|
||||||
|
|
||||||
if is_personal and request.user.profile.ui['hidden']['edits']:
|
if is_personal and request.user.profile.ui.get('hidden', {}).get('edits'):
|
||||||
qs = qs.exclude(name__in=request.user.profile.ui['hidden']['edits'])
|
qs = qs.exclude(name__in=request.user.profile.ui['hidden']['edits'])
|
||||||
|
|
||||||
response = json_response()
|
response = json_response()
|
||||||
|
|
|
@ -97,7 +97,7 @@ def findLists(request, data):
|
||||||
else:
|
else:
|
||||||
qs = _order_query(query['qs'], query['sort'])
|
qs = _order_query(query['qs'], query['sort'])
|
||||||
|
|
||||||
if is_personal and request.user.profile.ui['hidden']['lists']:
|
if is_personal and request.user.profile.ui.get('hidden', {}).get('lists'):
|
||||||
qs = qs.exclude(name__in=request.user.profile.ui['hidden']['lists'])
|
qs = qs.exclude(name__in=request.user.profile.ui['hidden']['lists'])
|
||||||
|
|
||||||
response = json_response()
|
response = json_response()
|
||||||
|
|
Loading…
Reference in a new issue