mirror of
https://github.com/go-gitea/gitea
synced 2024-11-17 15:31:06 +01:00
parent
62a9052075
commit
d93f3222a5
1 changed files with 7 additions and 1 deletions
|
@ -5,6 +5,7 @@ package packages
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
|
@ -26,6 +27,7 @@ import (
|
||||||
"code.gitea.io/gitea/modules/packages/rubygems"
|
"code.gitea.io/gitea/modules/packages/rubygems"
|
||||||
"code.gitea.io/gitea/modules/packages/swift"
|
"code.gitea.io/gitea/modules/packages/swift"
|
||||||
"code.gitea.io/gitea/modules/packages/vagrant"
|
"code.gitea.io/gitea/modules/packages/vagrant"
|
||||||
|
"code.gitea.io/gitea/modules/util"
|
||||||
|
|
||||||
"github.com/hashicorp/go-version"
|
"github.com/hashicorp/go-version"
|
||||||
)
|
)
|
||||||
|
@ -99,7 +101,11 @@ func GetPackageDescriptor(ctx context.Context, pv *PackageVersion) (*PackageDesc
|
||||||
}
|
}
|
||||||
creator, err := user_model.GetUserByID(ctx, pv.CreatorID)
|
creator, err := user_model.GetUserByID(ctx, pv.CreatorID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
if errors.Is(err, util.ErrNotExist) {
|
||||||
|
creator = user_model.NewGhostUser()
|
||||||
|
} else {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var semVer *version.Version
|
var semVer *version.Version
|
||||||
if p.SemverCompatible {
|
if p.SemverCompatible {
|
||||||
|
|
Loading…
Reference in a new issue