aboutsummaryrefslogtreecommitdiff
path: root/internal/db/org.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/org.go')
-rw-r--r--internal/db/org.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/db/org.go b/internal/db/org.go
index c5c55f44..93350746 100644
--- a/internal/db/org.go
+++ b/internal/db/org.go
@@ -14,6 +14,7 @@ import (
"xorm.io/xorm"
"gogs.io/gogs/internal/errutil"
+ "gogs.io/gogs/internal/userutil"
)
var ErrOrgNotExist = errors.New("Organization does not exist")
@@ -131,7 +132,7 @@ func CreateOrganization(org, owner *User) (err error) {
if _, err = sess.Insert(org); err != nil {
return fmt.Errorf("insert organization: %v", err)
}
- _ = org.GenerateRandomAvatar()
+ _ = userutil.GenerateRandomAvatar(org.ID, org.Name, org.Email)
// Add initial creator to organization and owner team.
if _, err = sess.Insert(&OrgUser{