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

Infinity value returned for new product creation and new after_save on_hand calculation #1820

Closed
ethier opened this issue Jul 31, 2012 · 2 comments

Comments

@ethier
Copy link
Contributor

ethier commented Jul 31, 2012

This is in reference to @a6a1f94

The following is returned when creating a new product (on 1-1-stable):

SQLite3::SQLException: no such column: Infinity: UPDATE "spree_products" SET "count_on_hand" = Infinity WHERE "spree_products"."id" = 222

I've been working on a solution but it is trickier than I thought. It is not capturing it as a new_record? in the on_hand method in the variant model so a simple conditional can't solve it.

For now, the only way around it is to comment out after_save :recalculate_product_on_hand, :if => :is_master?.

@radar
Copy link
Contributor

radar commented Aug 1, 2012

Sorry about that. I've now pushed a commit to 1-1-stable and master which will fix that issue.

@radar radar closed this as completed Aug 1, 2012
radar added a commit that referenced this issue Aug 1, 2012
radar added a commit that referenced this issue Aug 1, 2012
@ethier
Copy link
Contributor Author

ethier commented Aug 1, 2012

No worries. That fix makes a lot more sense than what I was trying to do. Thanks!

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

2 participants