2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

add icon support for user settings

This commit is contained in:
Matthias
2022-04-05 01:53:41 +02:00
parent 5b9f84a90f
commit 5f4c8b3a3e
2 changed files with 3 additions and 1 deletions

View File

@ -18,6 +18,7 @@ class NotificationMethod:
"""
METHOD_NAME = ''
METHOD_ICON = None
CONTEXT_BUILTIN = ['name', 'message', ]
CONTEXT_EXTRA = []
GLOBAL_SETTING = None
@ -156,7 +157,7 @@ class MethodStorageClass:
# save definition
methods.append({
'key': new_key,
'icon': 'envelope',
'icon': getattr(item, 'METHOD_ICON', ''),
'method': item.METHOD_NAME,
})
return methods