* fixes save_limit +1

* adds save_limit test
* expands recycle test
This commit is contained in:
Ilan
2015-07-31 18:39:54 +02:00
parent a1c67c819b
commit 9899c42740
2 changed files with 26 additions and 9 deletions
+1 -1
View File
@@ -403,7 +403,7 @@ def save_task(task):
return
# SAVE LIMIT > 0: Prune database, SAVE_LIMIT 0: No pruning
try:
if task['success'] and 0 < Conf.SAVE_LIMIT < Success.objects.count():
if task['success'] and 0 < Conf.SAVE_LIMIT <= Success.objects.count():
Success.objects.last().delete()
Task.objects.create(id=task['id'],
name=task['name'],