summaryrefslogtreecommitdiff
path: root/chimere/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/models.py')
-rw-r--r--chimere/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/chimere/models.py b/chimere/models.py
index 077419b..a34635d 100644
--- a/chimere/models.py
+++ b/chimere/models.py
@@ -1100,11 +1100,11 @@ def getDateCondition():
after = (datetime.datetime.now() + \
datetime.timedelta(settings.CHIMERE_DAYS_BEFORE_EVENT)
).strftime('%Y-%m-%d')
- date_condition = " and %(alias)s.start_date is null or "
+ date_condition = " and (%(alias)s.start_date is null or "
date_condition += "(%(alias)s.start_date >= '" + now + "' and "
date_condition += "%(alias)s.start_date <='" + after + "')"
date_condition += " or (%(alias)s.start_date <='" + now + "' and "
- date_condition += "%(alias)s.end_date >='" + now + "') "
+ date_condition += "%(alias)s.end_date >='" + now + "')) "
return date_condition
class SimplePoint: