diff options
Diffstat (limited to 'models/org.go')
-rw-r--r-- | models/org.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/models/org.go b/models/org.go index 4a4fcb4add..b349e4c170 100644 --- a/models/org.go +++ b/models/org.go @@ -453,7 +453,12 @@ func RemoveOrgUser(orgID, userID int64) error { return err } if t.NumMembers == 1 { - return ErrLastOrgOwner{UID: userID} + if err := t.GetMembers(); err != nil { + return err + } + if t.Members[0].ID == userID { + return ErrLastOrgOwner{UID: userID} + } } } |