From 1ddf3c62c48b8a976ff567b73495abdcefb5c2fe Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 11 Jan 2022 14:31:35 +1100 Subject: [PATCH 1/2] CSS fixes for table filter tags --- InvenTree/InvenTree/static/css/inventree.css | 2 ++ InvenTree/templates/js/translated/filters.js | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/static/css/inventree.css b/InvenTree/InvenTree/static/css/inventree.css index 317ebaa37b..3f6fffe19b 100644 --- a/InvenTree/InvenTree/static/css/inventree.css +++ b/InvenTree/InvenTree/static/css/inventree.css @@ -319,6 +319,7 @@ main { display: inline-block; *display: inline; zoom: 1; + padding-top: 3px; padding-left: 3px; padding-right: 3px; border: 1px solid #aaa; @@ -327,6 +328,7 @@ main { margin: 1px; margin-left: 5px; margin-right: 5px; + white-space: nowrap; } .filter-button { diff --git a/InvenTree/templates/js/translated/filters.js b/InvenTree/templates/js/translated/filters.js index 7ae8c3e4b4..78ed30eefa 100644 --- a/InvenTree/templates/js/translated/filters.js +++ b/InvenTree/templates/js/translated/filters.js @@ -305,7 +305,16 @@ function setupFilterList(tableKey, table, target) { var title = getFilterTitle(tableKey, key); var description = getFilterDescription(tableKey, key); - element.append(`
${title} = ${value}x
`); + var filter_tag = ` +
+ ${title} = ${value} + + + +
+ `; + + element.append(filter_tag); } // Callback for reloading the table From 4f79904fc84a8bfc48a9107cfc7b435a4a50efb7 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 11 Jan 2022 15:02:32 +1100 Subject: [PATCH 2/2] Ignore events from 'webhook' tables --- InvenTree/plugin/events.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/InvenTree/plugin/events.py b/InvenTree/plugin/events.py index f777621a45..21c68d0a7c 100644 --- a/InvenTree/plugin/events.py +++ b/InvenTree/plugin/events.py @@ -124,6 +124,8 @@ def allow_table_event(table_name): ignore_tables = [ 'common_notificationentry', + 'common_webhookendpoint', + 'common_webhookmessage', ] if table_name in ignore_tables: @@ -140,6 +142,11 @@ def after_save(sender, instance, created, **kwargs): table = sender.objects.model._meta.db_table + instance_id = getattr(instance, 'id', None) + + if instance_id is None: + return + if not allow_table_event(table): return