From f607ee67d5ccb497764d77c6bcc79c1eb61981d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Mon, 11 Jan 2021 10:08:36 +0200 Subject: [PATCH] Allow searching in the error field in Notifications admin --- hc/api/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hc/api/admin.py b/hc/api/admin.py index 56a55d3a..bcc766f1 100644 --- a/hc/api/admin.py +++ b/hc/api/admin.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.paginator import Paginator from django.db import connection -from django.db.models import Count, F +from django.db.models import F from django.urls import reverse from django.utils.html import escape from django.utils.safestring import mark_safe @@ -209,7 +209,7 @@ class ChannelsAdmin(admin.ModelAdmin): @admin.register(Notification) class NotificationsAdmin(admin.ModelAdmin): - search_fields = ["owner__name", "owner__code", "channel__value"] + search_fields = ["owner__name", "owner__code", "channel__value", "error"] readonly_fields = ("owner",) list_select_related = ("owner", "channel") list_display = (