summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-06-02 00:16:39 +0200
committerÉtienne Loks <etienne.loks@proxience.com>2015-06-02 00:16:39 +0200
commit9da920d80dfcad81df060ec1e9f52a500f281b3a (patch)
treec9836def856c37446d52f30fecd4c2b29fb3c66e /ishtar_common/models.py
parent98c990d7ad27856be88cbcc188c5aa1bdd955d5d (diff)
downloadIshtar-9da920d80dfcad81df060ec1e9f52a500f281b3a.tar.bz2
Ishtar-9da920d80dfcad81df060ec1e9f52a500f281b3a.zip
Remove error file when no error is reported on re-import
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 1db35741d..09740436c 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -1382,7 +1382,7 @@ class Import(models.Model):
actions.append(('A', _(u"Re-analyse")))
actions.append(('I', _(u"Re-import")))
actions.append(('AC', _(u"Archive")))
- if self.state in ('AC'):
+ if self.state == 'AC':
actions.append(('A', _(u"Unarchive")))
actions.append(('D', _(u"Delete")))
return actions
@@ -1446,6 +1446,7 @@ class Import(models.Model):
self.error_file = File(open(fle.name))
else:
self.state = 'F'
+ self.error_file = None
self.save()
def archive(self):