spree_multi_tenant icon indicating copy to clipboard operation
spree_multi_tenant copied to clipboard

Spree::Product does not recognise master

Open mishrarohit opened this issue 11 years ago • 3 comments

I created a tenant and added tenant_id: 1 to all the default products that Spree comes with. Now browsing to `/admin/products' gives

Spree::Product#master_images delegated to master.images, but master is nil: #<Spree::Product id: 7, name: "Apache Baseball Jersey", description: "Aut enim vero aperiam aut ipsam quaerat veritatis e...", available_on: "2014-04-14 08:40:27", deleted_at: nil, slug: "apache-baseball-jersey", meta_description: nil, meta_keywords: nil, tax_category_id: 1, shipping_category_id: 1, created_at: "2014-04-14 08:40:28", updated_at: "2014-04-14 09:18:47", tenant_id: 1>

The only similar issue I could find is https://github.com/spree/spree/issues/2697 by @harssh who I assume faced similar issue while using this gem as he has added a couple of other issues here too.

mishrarohit avatar Apr 14 '14 09:04 mishrarohit

Hi @movingahead I think tenant id is not added to your asset table where your image for this product is present. Can you please verify that. Thanks

harssh avatar Apr 14 '14 14:04 harssh

I set tenant_id in the Spree::Image table, but am getting the same error.

mishrarohit avatar Apr 15 '14 12:04 mishrarohit

make sure you have a value for your rows in the tenant column in spree_variants

masterkain avatar Aug 04 '14 23:08 masterkain