diff --git a/api/replication_policy.go b/api/replication_policy.go index f3b481946..be24aa0e9 100644 --- a/api/replication_policy.go +++ b/api/replication_policy.go @@ -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 { go func() { if err := TriggerReplication(id, "", nil, models.RepOpTransfer); err != nil {