2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 20:20:58 +00:00

user notification settings

This commit is contained in:
Matthias
2022-04-04 23:46:19 +02:00
parent 2fee6b02db
commit 1eb511e8a0
9 changed files with 153 additions and 3 deletions

View File

@ -265,6 +265,12 @@ class BaseInvenTreeSetting(models.Model):
filters['plugin'] = plugin
kwargs['plugin'] = plugin
# Filter by method
method = kwargs.get('method', None)
if method is not None:
filters['method'] = method
try:
setting = settings.filter(**filters).first()
except (ValueError, cls.DoesNotExist):