mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 19:40:19 +08:00
Fix get null object bug.
This commit is contained in:
@ -44,6 +44,10 @@ func GetOrganizations(owner string) []*Organization {
|
||||
}
|
||||
|
||||
func getOrganization(owner string, name string) *Organization {
|
||||
if owner == "" || name == "" {
|
||||
return nil
|
||||
}
|
||||
|
||||
organization := Organization{Owner: owner, Name: name}
|
||||
existed, err := adapter.Engine.Get(&organization)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user