mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 10:55:54 +08:00
Fix undefined method for NilClass
error.
This commit is contained in:
parent
af3c153687
commit
e2b64257b3
|
@ -485,7 +485,7 @@ class UsersController < ApplicationController
|
|||
render json: {
|
||||
success: false,
|
||||
message: @error,
|
||||
errors: @user&.errors.to_hash,
|
||||
errors: @user&.errors&.to_hash,
|
||||
is_developer: UsernameCheckerService.is_developer?(@user.email),
|
||||
admin: @user.admin?
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user