From 3f99d5644d6346df95d0f033823a76785edb7329 Mon Sep 17 00:00:00 2001 From: eLBati Date: Tue, 23 Jul 2024 11:40:57 +0200 Subject: [PATCH] FIX helpdesk_mgmt when disabling "Required Category" in portal settings - Disable "Required Category" in helpdesk settings - Create a ticket by /new/ticket with empty category Get File "/mnt/data/odoo-addons-dir/helpdesk_mgmt/controllers/main.py", line 73, in _prepare_submit_ticket_vals int(kw.get("category")) ValueError: invalid literal for int() with base 10: '' --- helpdesk_mgmt/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpdesk_mgmt/controllers/main.py b/helpdesk_mgmt/controllers/main.py index ab772c6883..c9f8fe00a8 100644 --- a/helpdesk_mgmt/controllers/main.py +++ b/helpdesk_mgmt/controllers/main.py @@ -70,7 +70,7 @@ def create_new_ticket(self, **kw): def _prepare_submit_ticket_vals(self, **kw): category = http.request.env["helpdesk.ticket.category"].browse( - int(kw.get("category")) + int(kw.get("category") or 0) ) company = category.company_id or http.request.env.company vals = {