mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 13:06:56 +08:00
Fix undefined method for NilClass
error.
This commit is contained in:
@ -485,7 +485,7 @@ class UsersController < ApplicationController
|
|||||||
render json: {
|
render json: {
|
||||||
success: false,
|
success: false,
|
||||||
message: @error,
|
message: @error,
|
||||||
errors: @user&.errors.to_hash,
|
errors: @user&.errors&.to_hash,
|
||||||
is_developer: UsernameCheckerService.is_developer?(@user.email),
|
is_developer: UsernameCheckerService.is_developer?(@user.email),
|
||||||
admin: @user.admin?
|
admin: @user.admin?
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user