mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-10-16 10:17:41 +00:00
Fix some variable shadowing.
This commit is contained in:
1 parent
87fbd5201b
commit
6e32e3dcf4
2 files changed
+9
-3
No files matched your search
+3
-1
@@ -259,7 +259,9 @@ func apiReposPackagesAddDelete(c *gin.Context, cb func(list *deb.PackageList, p
|
||||
|
||||
// verify package refs and build package list
|
||||
for _, ref := range b.PackageRefs {
|
||||
p, err := context.CollectionFactory().PackageCollection().ByKey([]byte(ref))
|
||||
var p *deb.Package
|
||||
|
||||
p, err = context.CollectionFactory().PackageCollection().ByKey([]byte(ref))
|
||||
if err != nil {
|
||||
if err == database.ErrNotFound {
|
||||
c.Fail(404, fmt.Errorf("package %s: %s", ref, err))
|
||||
|
||||
Reference in new issue
Block a user