Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error searching customers when editing an order #27

Open
aaronsmulktis opened this issue Aug 8, 2021 · 1 comment
Open

Error searching customers when editing an order #27

aaronsmulktis opened this issue Aug 8, 2021 · 1 comment

Comments

@aaronsmulktis
Copy link
Member

I get this error when using "Customer Search" on the Order edit page:

web_1  |    (3.4ms)  SELECT "spree_roles"."name" FROM "spree_roles" INNER JOIN "spree_role_users" ON "spree_roles"."id" = "spree_role_users"."role_id" WHERE "spree_role_users"."user_id" = $1  [["user_id", 1]]
web_1  |   ↳ app/controllers/spree/api/base_controller.rb:78:in `load_user_roles'
web_1  |   Rendering /usr/local/bundle/bundler/gems/spree-6bda546328a3/api/app/views/spree/api/v1/users/index.rabl
web_1  |   Rendered /usr/local/bundle/bundler/gems/spree-6bda546328a3/api/app/views/spree/api/v1/users/index.rabl (Duration: 1.6ms | Allocations: 1606)
web_1  | Completed 500 Internal Server Error in 56ms (ActiveRecord: 8.7ms | Allocations: 46852)
web_1  |
web_1  |
web_1  |
web_1  | ActionView::Template::Error (undefined method `count' for nil:NilClass):
web_1  |     1: object false
web_1  |     2: child(@users => :users) do
web_1  |     3:   extends 'spree/api/v1/users/show'
web_1  |     4: end
web_1  |     5: node(:count) { @users.count }
web_1  |     6: node(:current_page) { params[:page].try(:to_i) || 1 }
web_1  |
web_1  | (eval):6:in `block in cached_source_954957783935605124'
@aaronsmulktis
Copy link
Member Author

There is definitely a user with an email + name existing in the DB that I am searching for

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant