diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-03-08 23:05:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-08 23:05:15 +0800 |
commit | 5d40db629cb3a9ffdb7cdaa759f80c253c5ea428 (patch) | |
tree | 2386b045db24c3845fa8fdd77141e7b94cdd1f85 /models/org.go | |
parent | af9998b8a7b1db3d41783a115a2d0506bcba09d3 (diff) | |
download | gitea-5d40db629cb3a9ffdb7cdaa759f80c253c5ea428.tar.gz gitea-5d40db629cb3a9ffdb7cdaa759f80c253c5ea428.zip |
fix random avatars (#1147)
Diffstat (limited to 'models/org.go')
-rw-r--r-- | models/org.go | 4 |
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{ |