Prechádzať zdrojové kódy

Stop requiring a DELETE call for fresh import after finished imports. Closes #1369.

Kailash Nadh 2 rokov pred
rodič
commit
5b404615fc
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      internal/subimporter/importer.go

+ 1 - 1
internal/subimporter/importer.go

@@ -159,7 +159,7 @@ func New(opt Options, db *sql.DB, i *i18n.I18n) *Importer {
 // NewSession returns an new instance of Session. It takes the name
 // of the uploaded file, but doesn't do anything with it but retains it for stats.
 func (im *Importer) NewSession(opt SessionOpt) (*Session, error) {
-	if im.getStatus() != StatusNone {
+	if !im.isDone() {
 		return nil, errors.New("an import is already running")
 	}