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

Improve course_registration_allowed.

File:
1 edited

Legend:

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

    r13036 r13070  
    7171        except TypeError, KeyError:
    7272            return True
     73        if not deadline or deadline > datetime.now(pytz.utc):
     74            return True
    7375        payment_made = False
    7476        if len(self.student['payments']):
     
    7880                    ticket.p_state == 'paid':
    7981                        payment_made = True
    80         if deadline and deadline < datetime.now(pytz.utc) and not payment_made:
    81             return False
    82         return True
     82        if payment_made:
     83            return True
     84        return False
    8385
    8486CustomStudentStudyLevel = attrs_to_fields(
Note: See TracChangeset for help on using the changeset viewer.