Ignore:
Timestamp:
22 Sep 2021, 15:43:10 (3 years ago)
Author:
Henrik Bettermann
Message:

Catch error.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py

    r16634 r16636  
    278278            certificate = self.context.student['studycourse'].certificate
    279279        except (AttributeError, TypeError):
    280             return sf_paid, 0
     280            return sf_paid, 0, 0
     281        total_sf = 0.0
    281282        if self.context.student in (ADMITTED, CLEARANCE, REQUESTED, CLEARED):
    282             total_sf = getattr(certificate, 'school_fee_1', 0.0)
     283            sf = getattr(certificate, 'school_fee_1', 0.0)
    283284        else:
    284             total_sf = getattr(certificate, 'school_fee_2', 0.0)
     285            sf = getattr(certificate, 'school_fee_2', 0.0)
     286        if sf is not None:
     287            total_sf = sf
    285288        brought_fwd = 0.0
    286289        for ticket in self.context.values():
Note: See TracChangeset for help on using the changeset viewer.