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

BTHAB-180: Only perform delete if id line item is not empty #971

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

erawat
Copy link
Member

@erawat erawat commented Sep 11, 2023

Overview

This PR adds the logic to prevent deleting SaleOrderLine objects when there isn't any ID attaches to the SaleOrder['items'] which will cause the error as we are passing an empty array to the query.

This scenario is likely to happen when the API caller want to update a sale order/quotation with a new list of product items, where the product items have not been created yet.

@erawat erawat force-pushed the BTHAB-180-only-remove-if-not-empty branch from c5aa13c to 54f2773 Compare September 11, 2023 14:34
@erawat erawat force-pushed the BTHAB-180-only-remove-if-not-empty branch from 54f2773 to dbe0ae0 Compare September 11, 2023 14:49
@erawat erawat merged commit 87ce173 into BTHAB-3-workstream Sep 11, 2023
2 checks passed
@erawat erawat deleted the BTHAB-180-only-remove-if-not-empty branch September 11, 2023 15:05
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

Successfully merging this pull request may close these issues.

2 participants