skip command if settings do not exist (#30284)
This commit is contained in:
parent
5ba59b3c75
commit
7467c3dfb9
|
@ -22,6 +22,8 @@ class Command(BaseCommand):
|
|||
return requests.get(url, headers={'Accept': 'application/json'})
|
||||
|
||||
def handle(self, *args, **kwargs):
|
||||
if not getattr(settings, 'ENCOMBRANTS_FORM_URL', None):
|
||||
return
|
||||
if datetime.today().weekday() in (5, 6):
|
||||
# we don't notify during the weekend
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue