Fix context menu
This commit is contained in:
@@ -12,7 +12,6 @@ from rest_framework.parsers import FormParser
|
||||
from rest_framework.views import APIView
|
||||
|
||||
from core.db.storage import db
|
||||
from core.lib.context import construct_query
|
||||
from core.lib.threshold import (
|
||||
annotate_num_chans,
|
||||
annotate_num_users,
|
||||
@@ -361,9 +360,14 @@ class DrilldownContextModal(APIView):
|
||||
if query_params["type"] not in ["znc", "auth"]:
|
||||
annotate = True
|
||||
# Create the query with the context helper
|
||||
if query_params["num"].isdigit():
|
||||
query_params["num"] = int(query_params["num"])
|
||||
search_query = construct_query(
|
||||
if "num" in query_params:
|
||||
if query_params["num"]:
|
||||
if query_params["num"].isdigit():
|
||||
query_params["num"] = int(query_params["num"])
|
||||
else:
|
||||
return {"message": "Invalid num value", "class": "danger"}
|
||||
|
||||
search_query = db.construct_context_query(
|
||||
query_params["index"],
|
||||
query_params["net"],
|
||||
query_params["channel"],
|
||||
|
||||
Reference in New Issue
Block a user