diff --git a/bi_sql_editor/models/bi_sql_view.py b/bi_sql_editor/models/bi_sql_view.py index a09f6ff83..6193b450d 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 @@ -396,7 +396,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, }