Ignore:
Timestamp:
17 Jun 2015, 05:08:17 (10 years ago)
Author:
Henrik Bettermann
Message:

Improve course_registration_allowed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py

    r13057 r13069  
    214214        except (TypeError, KeyError):
    215215            return True
     216        if not deadline or deadline > datetime.now(pytz.utc):
     217            return True
    216218        payment_made = False
    217219        if len(self.student['payments']):
     
    221223                    ticket.p_state == 'paid':
    222224                        payment_made = True
    223         if deadline and deadline < datetime.now(pytz.utc) and not payment_made:
    224             return False
    225         return True
     225        if payment_made:
     226            return True
     227        return False
    226228
    227229    def addCourseTicket(self, ticket, course):
Note: See TracChangeset for help on using the changeset viewer.