mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-04 14:46:57 -05:00
Fix bug
This commit is contained in:
parent
842d734265
commit
dd0ff150bf
@ -247,10 +247,10 @@ func TryInsertPackage(ctx context.Context, p *Package) (*Package, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if has {
|
if !has {
|
||||||
return &existing, ErrDuplicatePackage
|
return nil, util.ErrNotExist
|
||||||
}
|
}
|
||||||
return p, nil
|
return &existing, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeletePackageByID deletes a package by id
|
// DeletePackageByID deletes a package by id
|
||||||
|
Loading…
Reference in New Issue
Block a user