diff options
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 |
commit | 75cb3836cc42a62859deeac0cd2bca704710c1c9 (patch) | |
tree | c9836def856c37446d52f30fecd4c2b29fb3c66e /ishtar_common/models.py | |
parent | 87586523ea42869e0b5d01df422d27a2b2b4127b (diff) | |
download | Ishtar-75cb3836cc42a62859deeac0cd2bca704710c1c9.tar.bz2 Ishtar-75cb3836cc42a62859deeac0cd2bca704710c1c9.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.py | 3 |
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): |