Merge pull request #10394 from heww/cherry-pick-pr-10393

[Cherry pick]fix(scanner): use new created ormer for transaction
This commit is contained in:
Qian Deng 2020-01-09 14:29:47 +08:00 committed by GitHub
commit ceb4bbf849
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,7 +130,7 @@ func ListRegistrations(query *q.Query) ([]*Registration, error) {
// SetDefaultRegistration sets the specified registration as default one
func SetDefaultRegistration(UUID string) error {
o := dao.GetOrmer()
o := orm.NewOrm()
err := o.Begin()
if err != nil {
return err