Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] event: prevent an error when open a event ticket with invalid url #170833

Draft
wants to merge 1 commit into
base: 17.0
Choose a base branch
from

Conversation

mega-odoo
Copy link
Contributor

@mega-odoo mega-odoo commented Jun 26, 2024

Currently, an error occurs while opening an event ticket with an invalid URL.

Step To Produce:

  • Install the 'event' module.
  • And Open any booked event, click on 'Attendees', and open any record, Click on 'View Ticket' in chatter.
  • Copy the ticket URL and try to open this ticket URL without 'registration_ids' which is included in it.
TypeError: EventController.event_my_tickets() missing 2 required positional
arguments: 'registration_ids' and 'tickets_hash'

An error occurs when the system tries to call a route '/event/int:event_id/my_tickets'' without certain parameters at [1].

Link [1]:

def event_my_tickets(self, event_id, registration_ids, tickets_hash, badge_mode=False, responsive_html=False):

To handle this issue, provide a default value to the parameter of the route method.

sentry-4952598215


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@robodoo
Copy link
Contributor

robodoo commented Jun 26, 2024

Pull request status dashboard

Currently, an error occurs while opening an event ticket with an invalid URL.

Step To Produce:

Install the 'event' module.
And Open any booked event, click on 'Attendees', and open any record, Click on
'View Ticket' in chatter.
Copy the ticket URL and try to open this ticket URL without 'registration_ids'
which is included in it.

TypeError: EventController.event_my_tickets() missing 2 required positional
arguments: 'registration_ids' and 'tickets_hash'

An error occurs when the system tries to call a route
'/event/int:event_id/my_tickets'' without certain parameters at [1].

To handle this issue, provide a default value to the parameter of the route
method.

sentry-4952598215
@mega-odoo mega-odoo force-pushed the 17.0-sentry-4952598215-event-type-error-mega branch from d99c4ef to ec41d5d Compare June 26, 2024 05:51
@C3POdoo C3POdoo added the RD research & development, internal work label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants