Skip to content

Commit

Permalink
FIX helpdesk_mgmt when disabling "Required Category" in portal settings
Browse files Browse the repository at this point in the history
 - 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: ''
  • Loading branch information
eLBati authored and LorenzoC0 committed Jul 26, 2024
1 parent 5c54bd0 commit 3f99d56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helpdesk_mgmt/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 3f99d56

Please sign in to comment.