mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-04 11:08:11 +08:00
Added tests for failures filtering
fixed a bug
This commit is contained in:
+1
-1
@@ -64,7 +64,7 @@ class Task(models.Model):
|
||||
def get_task_group(group_id, failures=True):
|
||||
if failures:
|
||||
return Task.objects.filter(group=group_id)
|
||||
return Task.objects.filter(group_id=group_id).exclude(success=False)
|
||||
return Task.objects.filter(group=group_id).exclude(success=False)
|
||||
|
||||
def time_taken(self):
|
||||
return (self.stopped - self.started).total_seconds()
|
||||
|
||||
Reference in New Issue
Block a user