mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 22:34:43 +08:00
Fix undefined method for NilClass
error.
This commit is contained in:
@ -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?
|
||||
}
|
||||
|
Reference in New Issue
Block a user