Merged develop into feature/VBV-689-person-cs-error

This commit is contained in:
Christian Cueni 2024-07-01 09:21:03 +00:00
commit cc51e50396
2 changed files with 8 additions and 4 deletions

View File

@ -55,7 +55,9 @@ class CompetenceCertificateQuery(object):
root, info, id=None, slug=None, course_id=None, course_slug=None, user_id=None
):
try:
course_session_user = CourseSessionUser.objects.get(user__id=user_id)
course_session_user = CourseSessionUser.objects.filter(
user__id=user_id
).first()
except CourseSessionUser.DoesNotExist:
return None

View File

@ -75,9 +75,11 @@ def create_customer_xml(checkout_information: CheckoutInformation):
abacus_debitor_number=customer.abacus_debitor_number,
last_name=checkout_information.last_name,
first_name=checkout_information.first_name,
company_name=checkout_information.organisation_detail_name
if checkout_information.invoice_address == "org"
else "",
company_name=(
checkout_information.organisation_detail_name
if checkout_information.invoice_address == "org"
else ""
),
street=(
checkout_information.organisation_street
if checkout_information.invoice_address == "org"