Skip to content

Commit

Permalink
test: only return
Browse files Browse the repository at this point in the history
  • Loading branch information
luifermoron committed Mar 21, 2024
1 parent 18d5dcc commit 254ce42
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/useCases/LeaseContractUseCases.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ export default class LeaseContractUseCases extends AbstractUseCases<
};

const leaseTmp = await super.create(leaseContract);

if (leaseTmp._id) {
return { ...leaseTmp, url: '' };
// const lease = await this.findById(leaseTmp._id.toString(), []);
// return { ...lease, url: '' };
}

throw new Error('Lease not found');
return { ...leaseTmp, url: '' };
// if (leaseTmp._id) {
// return { ...leaseTmp, url: '' };
// const lease = await this.findById(leaseTmp._id.toString(), []);
// return { ...lease, url: '' };
// }

// throw new Error('Lease not found');
} catch (error) {
await session.abortTransaction();
await session.endSession();
Expand Down

0 comments on commit 254ce42

Please sign in to comment.