summaryrefslogtreecommitdiffstats
path: root/models/org.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-03-08 23:05:15 +0800
committerGitHub <noreply@github.com>2017-03-08 23:05:15 +0800
commit5d40db629cb3a9ffdb7cdaa759f80c253c5ea428 (patch)
tree2386b045db24c3845fa8fdd77141e7b94cdd1f85 /models/org.go
parentaf9998b8a7b1db3d41783a115a2d0506bcba09d3 (diff)
downloadgitea-5d40db629cb3a9ffdb7cdaa759f80c253c5ea428.tar.gz
gitea-5d40db629cb3a9ffdb7cdaa759f80c253c5ea428.zip
fix random avatars (#1147)
Diffstat (limited to 'models/org.go')
-rw-r--r--models/org.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/models/org.go b/models/org.go
index d6cbcc9658..9d7aaec7ef 100644
--- a/models/org.go
+++ b/models/org.go
@@ -135,7 +135,9 @@ func CreateOrganization(org, owner *User) (err error) {
if _, err = sess.Insert(org); err != nil {
return fmt.Errorf("insert organization: %v", err)
}
- org.GenerateRandomAvatar()
+ if err = org.generateRandomAvatar(sess); err != nil {
+ return fmt.Errorf("generate random avatar: %v", err)
+ }
// Add initial creator to organization and owner team.
if _, err = sess.Insert(&OrgUser{