From d87163407ab128bf476892ced0988c78ee0616b3 Mon Sep 17 00:00:00 2001 From: Petr Jasek Date: Wed, 15 Jun 2022 14:17:32 +0200 Subject: [PATCH] fix get archive error when there in celery --- apps/archive/archive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/archive/archive.py b/apps/archive/archive.py index b21f40b0a4..124598d4a5 100644 --- a/apps/archive/archive.py +++ b/apps/archive/archive.py @@ -176,7 +176,7 @@ def private_content_filter(req=None): }, } - if req is not None and req.args.get("scope"): + if req is not None and req.args is not None and req.args.get("scope"): query["bool"].setdefault("must", []).append({"term": {"scope": req.args.get("scope")}}) else: query["bool"].setdefault("must_not", []).append({"exists": {"field": "scope"}})