mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-21 17:55:30 +01:00
style: delete duplicate error check in artifacttrash dao (#20557)
Signed-off-by: chlins <chlins.zhang@gmail.com>
This commit is contained in:
parent
1c9cb2e253
commit
6a38ed3d77
@ -102,10 +102,8 @@ func (d *dao) Flush(ctx context.Context, cutOff time.Time) (err error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
sql := fmt.Sprintf(`DELETE FROM artifact_trash where creation_time <= TO_TIMESTAMP('%f')`, float64(cutOff.UnixNano())/float64((time.Second)))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = ormer.Raw(sql).Exec()
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user