diff options
Diffstat (limited to 'internal/db/org.go')
-rw-r--r-- | internal/db/org.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/internal/db/org.go b/internal/db/org.go index 88ad0236..cf984f14 100644 --- a/internal/db/org.go +++ b/internal/db/org.go @@ -16,9 +16,7 @@ import ( "gogs.io/gogs/internal/errutil" ) -var ( - ErrOrgNotExist = errors.New("Organization does not exist") -) +var ErrOrgNotExist = errors.New("Organization does not exist") // IsOwnedBy returns true if given user is in the owner team. func (org *User) IsOwnedBy(userID int64) bool { @@ -174,7 +172,7 @@ func CreateOrganization(org, owner *User) (err error) { // GetOrgByName returns organization by given name. func GetOrgByName(name string) (*User, error) { - if len(name) == 0 { + if name == "" { return nil, ErrOrgNotExist } u := &User{ |