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

Fixes sql exception when creating a product_option without values #12201

Merged
merged 2 commits into from Jan 29, 2019

Conversation

Projects
None yet
5 participants
@mowcixo
Copy link
Contributor

mowcixo commented Jan 17, 2019

Questions Answers
Branch? develop
Description? When you create a product_option without values through prestashop, it is going to execute a delete in () without any value.
Type? bug fix
Category? WS
BC breaks? no
Deprecations? no
How to test? Just create a product_option through webservice, with no value associations as following:
<prestashop>
<product_option>
  <is_color_group>0</is_color_group>
  <group_type>select</group_type>
  <position>0</position>
  <name>
    <language id="1">Temp</language>
  </name>
  <public_name>
    <language id="1">Temp</language>
  </public_name>
  <associations>
    <product_option_values />
  </associations>
</product_option>
</prestashop>

This change is Reviewable

@prestonBot

This comment has been minimized.

Copy link
Collaborator

prestonBot commented Jan 17, 2019

Hello @mowcixo!

This is your first pull request on the PrestaShop project. Thank you, and welcome to this Open Source community!

@PierreRambaud PierreRambaud added this to the 1.7.6.0 milestone Jan 24, 2019

@mbadrani

This comment has been minimized.

Copy link
Contributor

mbadrani commented Jan 24, 2019

Hello @mowcixo how can we reproduce the issue fixed b this PR? Can you provide me more details? thanks

@mowcixo

This comment has been minimized.

Copy link
Contributor Author

mowcixo commented Jan 24, 2019

Yes @mbadrani, just posting the xml code I wrote in the PR description against the WS api/product_options endpoint is going to fail, because the $ids array is empty. Tested in PrestaShop develop branch, corresponding to 1.7.5.0

@mbadrani mbadrani self-assigned this Jan 29, 2019

@mbadrani mbadrani added QA ✔️ and removed waiting for QA labels Jan 29, 2019

@Quetzacoalt91 Quetzacoalt91 merged commit 6125516 into PrestaShop:develop Jan 29, 2019

1 of 2 checks passed

code-review/reviewable 1 file left (mbadrani)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Quetzacoalt91

This comment has been minimized.

Copy link
Member

Quetzacoalt91 commented Jan 29, 2019

Thank you @mowcixo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment