diff --git a/.DS_Store b/.DS_Store index 23213aae..9aa77fe2 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/osinaweb/.DS_Store b/osinaweb/.DS_Store index c0ed0a8f..0627f6a2 100644 Binary files a/osinaweb/.DS_Store and b/osinaweb/.DS_Store differ diff --git a/osinaweb/customercore/templates/add_templates/customer-add-ticket.html b/osinaweb/customercore/templates/add_templates/customer-add-ticket.html index 3faf869d..ba209b93 100644 --- a/osinaweb/customercore/templates/add_templates/customer-add-ticket.html +++ b/osinaweb/customercore/templates/add_templates/customer-add-ticket.html @@ -34,7 +34,7 @@ {% else %} {% for customer_project in customer_projects %} - + {% endfor %} {% endif %} diff --git a/osinaweb/osinacore/.DS_Store b/osinaweb/osinacore/.DS_Store index 27b45a18..f3099d35 100644 Binary files a/osinaweb/osinacore/.DS_Store and b/osinaweb/osinacore/.DS_Store differ diff --git a/osinaweb/osinacore/__pycache__/views.cpython-310.pyc b/osinaweb/osinacore/__pycache__/views.cpython-310.pyc index bba184c9..6410f010 100644 Binary files a/osinaweb/osinacore/__pycache__/views.cpython-310.pyc and b/osinaweb/osinacore/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/osinacore/add/__pycache__/views.cpython-310.pyc b/osinaweb/osinacore/add/__pycache__/views.cpython-310.pyc index dff5a807..5b0c8830 100644 Binary files a/osinaweb/osinacore/add/__pycache__/views.cpython-310.pyc and b/osinaweb/osinacore/add/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/osinacore/add/views.py b/osinaweb/osinacore/add/views.py index f6c01766..7d058a00 100644 --- a/osinaweb/osinacore/add/views.py +++ b/osinaweb/osinacore/add/views.py @@ -634,16 +634,18 @@ def add_ticket(request, customer_id): if request.method == 'POST': project = None product = None - department_id = request.POST.get('department') - department = get_object_or_404(Department, id=department_id) + if request.POST.get('department'): + department = get_object_or_404(Department, id=request.POST.get('department')) regarding = 'General/Account/Billing' if request.POST.get('project'): project = get_object_or_404(Project, id=request.POST.get('project')) - department = project.project_type.department + if not department: + department = project.project_type.department regarding = 'Project/Product' elif request.POST.get('product'): product = get_object_or_404(Item, id=request.POST.get('product')) - department = product.item_type.department + if not department: + department = project.project_type.department regarding = 'Project/Product' ticket = Ticket( status = 'Open', diff --git a/osinaweb/osinacore/templates/.DS_Store b/osinaweb/osinacore/templates/.DS_Store index 97587ba8..8e010a73 100644 Binary files a/osinaweb/osinacore/templates/.DS_Store and b/osinaweb/osinacore/templates/.DS_Store differ diff --git a/osinaweb/osinacore/templates/add_templates/add-ticket.html b/osinaweb/osinacore/templates/add_templates/add-ticket.html index 04be705d..75995a4c 100644 --- a/osinaweb/osinacore/templates/add_templates/add-ticket.html +++ b/osinaweb/osinacore/templates/add_templates/add-ticket.html @@ -35,7 +35,7 @@ {% else %} {% for customer_project in customer_projects %} - + {% endfor %} {% endif %} diff --git a/osinaweb/static/.DS_Store b/osinaweb/static/.DS_Store index 78a96fb5..3acd28f0 100644 Binary files a/osinaweb/static/.DS_Store and b/osinaweb/static/.DS_Store differ