From 22118011ce18e5f57e1eddf85726f53b70aad898 Mon Sep 17 00:00:00 2001 From: michel Date: Tue, 30 Jan 2018 17:01:56 +0100 Subject: [PATCH] [TMP] Msg and check activity date start end date stop. --- golem_activity/models/golem_activity.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/golem_activity/models/golem_activity.py b/golem_activity/models/golem_activity.py index cc749aa..7664279 100644 --- a/golem_activity/models/golem_activity.py +++ b/golem_activity/models/golem_activity.py @@ -102,12 +102,12 @@ class GolemActivity(models.Model): activity.date_start > activity.date_stop: raise models.ValidationError(_('Start of the period cannot be ' 'after end of the period.')) - if activity.season_id.date_start > activity.date_start < activity.season_id.date_end: - msg = _(u'Start of the activity is not in range of an ' + if activity.season_id.date_start > activity.date_start: + msg = _(u'The start date of the activity is not in range of an ' 'existing period.') raise models.ValidationError(msg) - if activity.season_id.date_end < activity.date_stop > activity.season_id.date_start: - msg = _(u'End of the activity is not in range of an ' + if activity.season_id.date_end < activity.date_stop: + msg = _(u'The end date of the activity is not in range of an ' 'existing period.') raise models.ValidationError(msg)