mirror of
https://github.com/goharbor/harbor
synced 2025-04-20 16:28:56 +00:00
bug fix: fixed policy can not be updated
This commit is contained in:
parent
9cdb24f4e1
commit
2da237f8bb
|
@ -281,6 +281,11 @@ func (pa *RepPolicyAPI) Put() {
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if err = dao.UpdateRepPolicy(policy); err != nil {
|
||||||
|
log.Errorf("failed to update policy %d: %v", id, err)
|
||||||
|
pa.CustomAbort(http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError))
|
||||||
|
}
|
||||||
|
|
||||||
if policy.Enabled != originalPolicy.Enabled && policy.Enabled == 1 {
|
if policy.Enabled != originalPolicy.Enabled && policy.Enabled == 1 {
|
||||||
go func() {
|
go func() {
|
||||||
if err := TriggerReplication(id, "", nil, models.RepOpTransfer); err != nil {
|
if err := TriggerReplication(id, "", nil, models.RepOpTransfer); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user