Skip to content
This repository was archived by the owner on Apr 12, 2018. It is now read-only.

Commit 7416ea4

Browse files
author
Oleiade
committed
Fix WorfkflowExecutionQuerySet start closed date handling
1 parent e608f1c commit 7416ea4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

swf/querysets/workflow.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,12 @@ def filter(self, domain=None,
545545
', '.join(invalid_kwargs))
546546
raise InvalidKeywordArgumentError(err_msg)
547547

548-
start_oldest_date = datetime_timestamp(past_day(kwargs.get('oldest_date', 30)))
548+
if status == WorkflowExecution.STATUS_OPEN:
549+
oldest_date = kwargs.get('oldest_date', 30)
550+
else:
551+
oldest_date = kwargs.get('start_oldest_date', 30)
552+
553+
start_oldest_date = datetime_timestamp(past_day(oldest_date))
549554
return [self.to_WorkflowExecution(domain, wfe) for wfe in
550555
self._list_items(status,
551556
domain,

0 commit comments

Comments
 (0)