Skip to content

Commit f939180

Browse files
committed
fix: "store not found" won't stop login now
1 parent 0e61446 commit f939180

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

controllers/account.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func (c *ApiController) addInitialChat(organization string, userName string, sto
154154
return nil, err
155155
}
156156
if store == nil {
157-
return nil, fmt.Errorf(c.T("account:The default store is not found"))
157+
return nil, nil
158158
}
159159
}
160160

@@ -213,6 +213,9 @@ func (c *ApiController) addInitialChatAndMessage(user *casdoorsdk.User) error {
213213
if err != nil {
214214
return err
215215
}
216+
if chat == nil {
217+
return nil
218+
}
216219

217220
store, err := object.ResolveStoreByOwnerAndName("admin", chat.Store)
218221
if err != nil {

0 commit comments

Comments
 (0)