Skip to content

Commit

Permalink
fix users update error display
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Jan 18, 2023
1 parent 3bd07fb commit 24efec1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ def create
# PUT /users/1
# PUT /users/1.xml
def update
@user = LinkedData::Client::Models::User.find(params[:id])
@user = LinkedData::Client::Models::User.find_by_username(params[:id]).first if @user.nil?
@errors = validate_update(user_params)
if @errors.size < 1
@user = LinkedData::Client::Models::User.find(params[:id])
@user = LinkedData::Client::Models::User.find_by_username(params[:id]).first if @user.nil?

if params[:user][:password]
error_response = @user.update(values: { password: params[:user][:password] })
Expand Down

0 comments on commit 24efec1

Please sign in to comment.