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

This commit is contained in:
Kailash Nadh 2023-06-24 11:29:18 +05:30
parent 530165f5ee
commit 5b404615fc

View file

@ -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")
}