mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-24 09:38:09 +01:00
fix tag retention schedule none error (#8715)
Change-Id: I04cad9d4c520db751bfa413bb139317563716501 Signed-off-by: Ziming Zhang <zziming@vmware.com>
This commit is contained in:
parent
94c930f150
commit
0c79352c9c
@ -92,7 +92,7 @@ func (r *DefaultAPIController) GetRetention(id int64) (*policy.Metadata, error)
|
||||
func (r *DefaultAPIController) CreateRetention(p *policy.Metadata) (int64, error) {
|
||||
if p.Trigger.Kind == policy.TriggerKindSchedule {
|
||||
cron, ok := p.Trigger.Settings[policy.TriggerSettingsCron]
|
||||
if ok {
|
||||
if ok && len(cron.(string)) > 0 {
|
||||
jobid, err := r.scheduler.Schedule(cron.(string), SchedulerCallback, TriggerParam{
|
||||
PolicyID: p.ID,
|
||||
Trigger: ExecutionTriggerSchedule,
|
||||
|
Loading…
Reference in New Issue
Block a user