Changeset 16057


Ignore:
Timestamp:
18 Apr 2020, 08:12:53 (5 years ago)
Author:
Henrik Bettermann
Message:

Render proper application slips in all tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/pdf.py

    r15587 r16057  
    7979        """
    8080        course_admitted = self.context.course_admitted
    81         if view is not None and getattr(course_admitted, '__parent__',None):
    82             url = view.url(course_admitted)
    83             title = course_admitted.title
    84             code = course_admitted.code
    85             return '<a href="%s">%s - %s</a>' %(url,code,title)
     81        if course_admitted is not None:
     82            if view is None:
     83                title = course_admitted.title
     84                code = course_admitted.code
     85                return '%s - %s' %(code,title)
     86            if getattr(course_admitted, '__parent__',None):
     87                url = view.url(course_admitted)
     88                title = course_admitted.title
     89                code = course_admitted.code
     90                return '<a href="%s">%s - %s</a>' %(url,code,title)
    8691        return ''
    8792
Note: See TracChangeset for help on using the changeset viewer.