Fixed a bug where the transaction would roll back if no subcategories where present.
This commit is contained in:
@@ -84,6 +84,8 @@ func insertNewCategory(name string, subcategories []Subcategory) (recordID int64
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(subcategories) == 0 {
|
if len(subcategories) == 0 {
|
||||||
|
transaction.Commit()
|
||||||
|
|
||||||
return recordID, true
|
return recordID, true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user