diff options
Diffstat (limited to 'internal/db/repo.go')
-rw-r--r-- | internal/db/repo.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/db/repo.go b/internal/db/repo.go index 94f50dfe..97228015 100644 --- a/internal/db/repo.go +++ b/internal/db/repo.go @@ -1157,8 +1157,8 @@ func (err ErrReachLimitOfRepo) Error() string { // CreateRepository creates a repository for given user or organization. func CreateRepository(doer, owner *User, opts CreateRepoOptionsLegacy) (_ *Repository, err error) { - if !owner.CanCreateRepo() { - return nil, ErrReachLimitOfRepo{Limit: owner.RepoCreationNum()} + if !owner.canCreateRepo() { + return nil, ErrReachLimitOfRepo{Limit: owner.maxNumRepos()} } repo := &Repository{ @@ -2467,8 +2467,8 @@ func HasForkedRepo(ownerID, repoID int64) (*Repository, bool, error) { // ForkRepository creates a fork of target repository under another user domain. func ForkRepository(doer, owner *User, baseRepo *Repository, name, desc string) (_ *Repository, err error) { - if !owner.CanCreateRepo() { - return nil, ErrReachLimitOfRepo{Limit: owner.RepoCreationNum()} + if !owner.canCreateRepo() { + return nil, ErrReachLimitOfRepo{Limit: owner.maxNumRepos()} } repo := &Repository{ |