Fix dedup
This commit is contained in:
parent
5fdd5121eb
commit
bd8b995134
|
@ -330,7 +330,8 @@ class StorageBackend(ABC):
|
||||||
if kwargs.get("reverse"):
|
if kwargs.get("reverse"):
|
||||||
response.reverse()
|
response.reverse()
|
||||||
if kwargs.get("dedup"):
|
if kwargs.get("dedup"):
|
||||||
if not kwargs.get("dedup_fields"):
|
dedup_fields = kwargs.get("dedup_fields")
|
||||||
|
if not dedup_fields:
|
||||||
dedup_fields = ["msg", "nick", "ident", "host", "net", "channel"]
|
dedup_fields = ["msg", "nick", "ident", "host", "net", "channel"]
|
||||||
response = helpers.dedup_list(response, dedup_fields)
|
response = helpers.dedup_list(response, dedup_fields)
|
||||||
|
|
||||||
|
|
|
@ -173,6 +173,14 @@ class DrilldownTableView(SingleTableView):
|
||||||
tags = parse_tags(query_params["tags"])
|
tags = parse_tags(query_params["tags"])
|
||||||
extra_params["tags"] = tags
|
extra_params["tags"] = tags
|
||||||
|
|
||||||
|
if "dedup" in query_params:
|
||||||
|
if query_params["dedup"] == "on":
|
||||||
|
extra_params["dedup"] = True
|
||||||
|
else:
|
||||||
|
extra_params["dedup"] = False
|
||||||
|
else:
|
||||||
|
extra_params["dedup"] = False
|
||||||
|
|
||||||
context = db.query_results(request, query_params, **extra_params)
|
context = db.query_results(request, query_params, **extra_params)
|
||||||
|
|
||||||
# Unique is for identifying the widgets.
|
# Unique is for identifying the widgets.
|
||||||
|
|
Loading…
Reference in New Issue