fix(scanner): use new created ormer for transaction
fix(scanner): use new created ormer for transaction

Use new created ormer for transaction in SetDefaultRegistration

Closes #10284

Signed-off-by: He Weiwei <c834efa4898f8bf976e231f3903babf913725c68@vmware.com>

wy65701436/harbor,reasonerjt/harbor,reasonerjt/harbor,reasonerjt/harbor,wy65701436/harbor,wy65701436/harbor,reasonerjt/harbor,wy65701436/harbor,wy65701436/harbor,wy65701436/harbor,reasonerjt/harbor,reasonerjt/harbor