diff pkg/imports/bn.go @ 1906:32c56e6c089a

Stretch import: Added forgotten source file.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 18 Jan 2019 17:13:12 +0100
parents c4af342be999
children d966f03ea819
line wrap: on
line diff
--- a/pkg/imports/bn.go	Fri Jan 18 17:01:19 2019 +0100
+++ b/pkg/imports/bn.go	Fri Jan 18 17:13:12 2019 +0100
@@ -257,14 +257,14 @@
 	}
 
 	feedback.Info("Storing %d bottlenecks took %s", len(nids), time.Since(start))
-	if err = tx.Commit(); err == nil {
-		feedback.Info("Import of bottlenecks was successful")
+	if err := tx.Commit(); err != nil {
+		return nil, err
 	}
-
+	feedback.Info("Import of bottlenecks was successful")
 	summary := struct {
 		Bottlenecks []string `json:"bottlenecks"`
 	}{
 		Bottlenecks: nids,
 	}
-	return &summary, err
+	return &summary, nil
 }