lingo: make it possible to disable notification for new invoices (#22531)
This commit is contained in:
parent
76c2fec23e
commit
6730cbc466
|
@ -18,6 +18,7 @@
|
|||
|
||||
import logging
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from combo.apps.lingo.models import Regie
|
||||
|
@ -26,6 +27,8 @@ from combo.apps.lingo.models import Regie
|
|||
class Command(BaseCommand):
|
||||
|
||||
def handle(self, *args, **kwargs):
|
||||
if not settings.LINGO_INVOICE_NOTIFICATIONS_ENABLED:
|
||||
return
|
||||
logger = logging.getLogger(__name__)
|
||||
for regie in Regie.objects.exclude(webservice_url=''):
|
||||
try:
|
||||
|
|
|
@ -285,6 +285,9 @@ COMBO_MAP_TILE_URLTEMPLATE = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
|
|||
# default combo map attribution
|
||||
COMBO_MAP_ATTRIBUTION = 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
|
||||
|
||||
# send notifications about new invoices
|
||||
LINGO_INVOICE_NOTIFICATIONS_ENABLED = True
|
||||
|
||||
# default delta, in days, for invoice remind notifications
|
||||
LINGO_NEW_INVOICES_REMIND_DELTA = 7
|
||||
|
||||
|
|
Loading…
Reference in New Issue