Skip to content

Commit

Permalink
Merge pull request #1032 from Harshbhama/issues/fix-delete-client-iss…
Browse files Browse the repository at this point in the history
…ue-1025

fix: resolve client delete issue
  • Loading branch information
salahlalami authored May 12, 2024
2 parents a3cf937 + 44b3d67 commit 1c370d3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ const remove = async (Model, req, res) => {
}).exec();

const [quotes, invoice] = await Promise.allSettled([resultQuotes, resultInvoice]);
if (quotes) {
if (quotes?.value) {
return res.status(400).json({
success: false,
result: null,
message: 'Cannot delete client if client have any quote or invoice',
});
}
if (invoice) {
if (invoice?.value) {
return res.status(400).json({
success: false,
result: null,
Expand Down

0 comments on commit 1c370d3

Please sign in to comment.