From 5ada669f43b26b35c7f8ca2eab89fd8d2d5e3611 Mon Sep 17 00:00:00 2001 From: kaiyou Date: Tue, 16 Oct 2018 20:38:18 +0200 Subject: [PATCH] Rebase reply startdate on master --- core/admin/mailu/internal/templates/default.sieve | 2 +- core/admin/mailu/models.py | 2 +- core/admin/migrations/versions/3b281286c7bd_.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/admin/mailu/internal/templates/default.sieve b/core/admin/mailu/internal/templates/default.sieve index 214b8125..d771ee99 100644 --- a/core/admin/mailu/internal/templates/default.sieve +++ b/core/admin/mailu/internal/templates/default.sieve @@ -32,6 +32,6 @@ if exists "X-Virus" { stop; } -{% if user.reply_active and %} +{% if user.reply_active %} vacation :days 1 :subject "{{ user.reply_subject }}" "{{ user.reply_body }}"; {% endif %} diff --git a/core/admin/mailu/models.py b/core/admin/mailu/models.py index bb8cdc94..f7c3349d 100644 --- a/core/admin/mailu/models.py +++ b/core/admin/mailu/models.py @@ -280,7 +280,7 @@ class User(Base, Email): @property def reply_active(self): - now = datetime.datetime.now() + now = date.today() return ( self.reply_enabled and self.reply_startdate < now and diff --git a/core/admin/migrations/versions/3b281286c7bd_.py b/core/admin/migrations/versions/3b281286c7bd_.py index 78e44a4c..57b5c327 100644 --- a/core/admin/migrations/versions/3b281286c7bd_.py +++ b/core/admin/migrations/versions/3b281286c7bd_.py @@ -1,13 +1,13 @@ """ Add a start day for vacations Revision ID: 3b281286c7bd -Revises: 049fed905da7 +Revises: 25fd6c7bcb4a Create Date: 2018-09-27 22:20:08.158553 """ revision = '3b281286c7bd' -down_revision = '049fed905da7' +down_revision = '25fd6c7bcb4a' from alembic import op import sqlalchemy as sa