Skip to content

Commit

Permalink
Don't delete if no elements provided
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandrodob committed Apr 23, 2015
1 parent 1e4a6c7 commit eec8da5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pybossa/repositories/task_repository.py
Expand Up @@ -96,6 +96,8 @@ def delete(self, element):
cached_projects.clean_project(element.project_id)

def delete_all(self, elements):
if not elements:
return
for element in elements:
self._validate_can_be('deleted', element)
table = element.__class__
Expand Down

0 comments on commit eec8da5

Please sign in to comment.