mirror of
https://github.com/goharbor/harbor.git
synced 2024-09-28 21:37:31 +02:00
Fix schedule error msg.
Signed-off-by: fanjiankong <fanjiankong@tencent.com>
This commit is contained in:
parent
4a7a54cae8
commit
bbad4db645
@ -377,7 +377,12 @@ func (c *controller) UpdatePolicy(ctx context.Context, schema *policyModels.Sche
|
||||
// Update timestamp
|
||||
schema.UpdatedTime = time.Now()
|
||||
|
||||
return c.pManager.Update(ctx, schema, props...)
|
||||
err = c.pManager.Update(ctx, schema, props...)
|
||||
if (err != nil) && (needSch || needUn) {
|
||||
return errors.Wrapf(err, "Update failed, but not rollback scheduler")
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeletePolicy deletes the policy by id.
|
||||
|
Loading…
Reference in New Issue
Block a user