order user optional
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
2026-07-01 08:53:53 +03:30
parent f6d1716ad0
commit 5d0e862259
3 changed files with 9 additions and 3 deletions
@@ -111,7 +111,7 @@ export class PaymentsService {
await this.em.transactional(async em => {
const order = await em.findOne(Order, { id: ctx.order.id }, { populate: ['user', 'restaurant'] });
if (!order) throw new NotFoundException(OrderMessage.NOT_FOUND);
if (!order.user) throw new NotFoundException(OrderMessage.USER_NOT_FOUND);
if (order.status === OrderStatus.PAID) {
return;
}