From 7865875761f543ebe83c9f06fea1598f75e9ab32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Wed, 30 Nov 2022 13:21:38 +0100 Subject: [PATCH] [FIX] bi_sql_editor: Set tomorrow's date correctly. --- bi_sql_editor/models/bi_sql_view.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bi_sql_editor/models/bi_sql_view.py b/bi_sql_editor/models/bi_sql_view.py index 2ffe6ec51..b9b5d8420 100644 --- a/bi_sql_editor/models/bi_sql_view.py +++ b/bi_sql_editor/models/bi_sql_view.py @@ -3,7 +3,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import logging -from datetime import datetime +from datetime import datetime, timedelta from psycopg2 import ProgrammingError @@ -430,7 +430,7 @@ class BiSQLView(models.Model): "numbercall": -1, "interval_number": 1, "interval_type": "days", - "nextcall": datetime(now.year, now.month, now.day + 1), + "nextcall": now + timedelta(days=1), "active": True, }