Ignore:
Timestamp:
28 Feb 2022, 22:19:59 (3 years ago)
Author:
Henrik Bettermann
Message:

Subjects are certificates stored in Kofa.

Do only allow one application per subject-school combination.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/browser.py

    r15961 r16848  
    191191        counter = 0
    192192        for appl in container.values():
    193             if appl.state in (SUBMITTED, ADMITTED, NOT_ADMITTED, CREATED) \
    194                 and (appl.school1 == self.context.school1 \
    195                      or appl.school1 == data.get('school1')):
    196                 counter += 1
     193            if appl.state in (SUBMITTED, ADMITTED, NOT_ADMITTED, CREATED):
     194                if appl.school1 == self.context.school1 \
     195                    or appl.school1 == data.get('school1'):
     196                    counter += 1
     197                    if appl != self.context \
     198                        and (appl.subj_comb == self.context.subj_comb \
     199                            or appl.subj_comb == data.get('subj_comb')):
     200                        return True
    197201                if counter == 10:
    198202                    return True
Note: See TracChangeset for help on using the changeset viewer.