Merge pull request #3885 from ywk253100/171227_fix_update

Update project ID property if needed when updating replication policy
This commit is contained in:
Wenkai Yin 2017-12-27 15:45:53 +08:00 committed by GitHub
commit 4616153667
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -241,7 +241,7 @@ func GetRepPolicyByProjectAndTarget(projectID, targetID int64) ([]*models.RepPol
func UpdateRepPolicy(policy *models.RepPolicy) error {
o := GetOrmer()
policy.UpdateTime = time.Now()
_, err := o.Update(policy, "TargetID", "Name", "Description",
_, err := o.Update(policy, "ProjectID", "TargetID", "Name", "Description",
"Trigger", "Filters", "ReplicateDeletion", "UpdateTime")
return err
}