fix: use has_role() instead of role.value for payment amount assignment
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-04-08 11:54:43 +02:00
parent d19fd3802b
commit de6c429c4b

View File

@ -361,7 +361,8 @@ def rsvp(event_id):
)
# Auto-assign payment amount for paid events
if event.is_paid:
is_member = current_user.role and current_user.role.value >= 20 # MEMBER+
from database import SystemRole
is_member = current_user.has_role(SystemRole.MEMBER)
attendee.payment_amount = event.price_member if is_member else event.price_guest
db.add(attendee)
db.commit()