Skip to content

Commit

Permalink
Update task importer
Browse files Browse the repository at this point in the history
  • Loading branch information
valdergallo committed Feb 12, 2015
1 parent 95b18e5 commit 5d79cdc
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions data_importer/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,10 @@ def run(self, importer=None, source="", owner=None, message="",
If parser use raise_errors the error message will raise
and logged by celery
"""

if not self.parser.raise_errors:
# validate content
self.parser.is_valid()
# save valid values
self.parser.save()
else:
if self.parser.is_valid():
self.parser.save()
# validate content
self.parser.is_valid()
# save valid values
self.parser.save()

message += "\n"

Expand Down

0 comments on commit 5d79cdc

Please sign in to comment.