From 0d7ef88299678413d6ecc65ced4880c96d05f3dd Mon Sep 17 00:00:00 2001 From: Alex Tuyls Date: Tue, 17 Sep 2019 13:31:43 +0000 Subject: [PATCH] [FIX] event: allow ics file with public user If you register online on a free event, there is an access rights error when trying to download the ICS file if you are connectd with public user. `if not event` part is pointless, if event cannot be resolved, @http.route would return a 404 anyway. `if not event.registration_ids` does not make sense from a functional point of view: there is no problem in generating an .ics file for a public event that has no registrations (yet) and the button we use to generate the .ics file is displayed after the registration anyway. opw-2066847 closes odoo/odoo#37012 X-origin-commit: f4ca5897df9295b684bcbfcafd98fbde2f8bf673 Signed-off-by: Nicolas Martinelli (nim) --- addons/event/controllers/main.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/event/controllers/main.py b/addons/event/controllers/main.py index f844e6a5d51..723d30aaa51 100644 --- a/addons/event/controllers/main.py +++ b/addons/event/controllers/main.py @@ -10,8 +10,6 @@ class EventController(Controller): @route(['''/event//ics'''], type='http', auth="public") def event_ics_file(self, event, **kwargs): - if not event or not event.registration_ids: - return request.not_found() files = event._get_ics_file() if not event.id in files: return NotFound()