Skip to content

Commit

Permalink
fixing food order if disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
sovcik committed Jan 17, 2025
1 parent 3ce611e commit 189099a
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,7 @@ export class RegistrationDataSource extends BaseDataSource {
throw new Error('Turnaj nenájdený');
}

if (
!e.foodOrderEnabled &&
!(this.userGuard.isEventManager(e._id) || this.userGuard.isAdmin())
) {
if (!e.foodOrderEnabled && !this.userGuard.isEventManager(e._id) && !this.userGuard.isAdmin()) {
// allow admins and event managers to update food orders
throw new Error('Objednávky jedla nie sú povolené');
}
Expand Down

0 comments on commit 189099a

Please sign in to comment.