Shopify / shopify_transporter

The Transporter tool allows you to convert data from a third-party platform into a format that can be imported into Shopify.
MIT License
98 stars 43 forks source link

Fix No implicit conversion of String into Integer TypeError in discount pipeline stage. #126

Closed zliu1020-zz closed 5 years ago

zliu1020-zz commented 5 years ago

What it does and why:

Properly handle the case where the line_items is a singular hash instead of an array.

Checklist:


Related issues:

Closes: https://github.com/Shopify/shopify_transporter/issues/124

JordanVerasamy commented 5 years ago

Not really following what's going on in this PR. Could you explain in more detail?

JordanVerasamy commented 5 years ago

wait now i get it

JordanVerasamy commented 5 years ago

This change fixes the behaviour when it's a Hash but the value as float is negative. Right?

zliu1020-zz commented 5 years ago

To tophat, try running the file from Wolz again. We should no longer see any error from discount pipeline stage this time.

zliu1020-zz commented 5 years ago

This change fixes the behaviour when it's a Hash but the value as float is negative. Right?

@JordanVerasamy This change fixes the behaviour when it's a Hash but the value as float is 0. I doubt negative discount percentage is actually meaningful and I've never seen it before. But you get the general idea.

JordanVerasamy commented 5 years ago

Right, sorry, when I said negative I really meant non-positive. My b.