Fixed a bug where the transaction would roll back if no subcategories where present.

This commit is contained in:
2021-09-09 15:04:23 -05:00
parent 42594918ef
commit 913b7ca138
+2
View File
@@ -84,6 +84,8 @@ func insertNewCategory(name string, subcategories []Subcategory) (recordID int64
}
if len(subcategories) == 0 {
transaction.Commit()
return recordID, true
}