mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 22:57:38 +01:00
fix(scanner): use new created ormer for transaction
Use new created ormer for transaction in SetDefaultRegistration Closes #10284 Signed-off-by: He Weiwei <hweiwei@vmware.com>
This commit is contained in:
parent
76dcedb4f3
commit
b90ac468c5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user