mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Fix undefined method for NilClass
error.
This commit is contained in:
parent
af3c153687
commit
e2b64257b3
1 changed files with 1 additions and 1 deletions
|
@ -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?
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue