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

Delete supplier's address only if no other shops use it #16123

merged 1 commit into from Oct 28, 2019


Copy link

atomiix commented Oct 25, 2019

Questions Answers
Branch? develop
Description? Do not delete supplier's address if it's used for another shop
Type? bug fix
Category? BO
BC breaks? no
Deprecations? no
Fixed ticket? Fixes #14762
How to test? 1. Create two shops
2. Go to Brands & Supplier
3. Create a supplier for all shops
4. Then delete this supplier for shop A
5. Edit the supplier in shop B

This change is Reviewable

@atomiix atomiix requested a review from PrestaShop/prestashop-core-developers as a code owner Oct 25, 2019
if (1 >= count($entity->getAssociatedShops())) {
if (false === $this->deleteSupplierAddress($supplierId)) {

This comment has been minimized.

Copy link

PierreRambaud Oct 25, 2019

Suggested change
if (false === $this->deleteSupplierAddress($supplierId)) {
if (1 >= count($entity->getAssociatedShops()) && false === $this->deleteSupplierAddress($supplierId)) {

Only one if is needed 😅 Sorry

@atomiix atomiix force-pushed the atomiix:fix-supplier-edit-multistore branch from ff811d9 to 5c7b5ee Oct 25, 2019
@PierreRambaud PierreRambaud added this to the milestone Oct 25, 2019
@sarahdib sarahdib self-assigned this Oct 28, 2019
@sarahdib sarahdib added QA ✔️ and removed waiting for QA labels Oct 28, 2019

This comment has been minimized.

Copy link

matks commented Oct 28, 2019

Thank you @atomiix

@matks matks merged commit 22e5822 into PrestaShop:develop Oct 28, 2019
2 checks passed
2 checks passed
PrettyCI Code formatting
Travis CI - Pull Request Build Passed
@atomiix atomiix deleted the atomiix:fix-supplier-edit-multistore branch Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
5 participants
You can’t perform that action at this time.