diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-10-27 00:44:02 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-10-27 00:44:02 +0200 |
| commit | d4c428210d244226bbee8928c674b6a0a9f27a34 (patch) | |
| tree | b02979e3cf8f0f7290a8fe06857e6acff92cac0f /chimere/models.py | |
| parent | 057bb8517a9a1238631e1ed1e8ac1a26a26d9926 (diff) | |
| download | Chimère-d4c428210d244226bbee8928c674b6a0a9f27a34.tar.bz2 Chimère-d4c428210d244226bbee8928c674b6a0a9f27a34.zip | |
Fix dynamic evaluation of categories (refs #379)
Diffstat (limited to 'chimere/models.py')
| -rw-r--r-- | chimere/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chimere/models.py b/chimere/models.py index c3a5f6e..830f5a9 100644 --- a/chimere/models.py +++ b/chimere/models.py @@ -993,11 +993,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: |
