fix deadline indexer for information objects

This commit is contained in:
Frédéric Péters 2014-02-12 15:45:42 +01:00
parent 475bbc7463
commit 1b17f0b61f
1 changed files with 4 additions and 1 deletions

View File

@ -30,7 +30,10 @@ def responsible(obj, **kw):
@indexer(IBaseTask)
def deadline(obj, **kw):
return obj.deadline or obj.modified()
if hasattr(obj, 'deadline') and obj.deadline:
return obj.deadline
# fallback to modification time if there's no deadline (== information)
return obj.modified()
@indexer(IBaseTask)