reversing part of the transaction cull
This commit is contained in:
parent
1cc1df2726
commit
6a065d5cfc
|
|
@ -498,12 +498,24 @@ func (ssa *SQLStorageAuthority) FinalizeAuthorization(authz core.Authorization)
|
||||||
}
|
}
|
||||||
oldAuth := authObj.(*PendingAuthzModel)
|
oldAuth := authObj.(*PendingAuthzModel)
|
||||||
|
|
||||||
err = ssa.dbMap.Insert(auth)
|
tx, err := ssa.dbMap.Begin()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = ssa.dbMap.Delete(oldAuth)
|
err = tx.Insert(auth)
|
||||||
|
if err != nil {
|
||||||
|
tx.Rollback()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
_, err = tx.Delete(oldAuth)
|
||||||
|
if err != nil {
|
||||||
|
tx.Rollback()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
tx.Commit()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue