Ignore:
Timestamp:
29 May 2012, 06:22:11 (12 years ago)
Author:
Henrik Bettermann
Message:

Fix emergency fix. Due to this bug I recovered that generate_applicant_id generates duplicate keys.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/applicants
Files:
2 edited

Legend:

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

    r8290 r8540  
    3131def generate_applicant_id(container=None):
    3232    if container is not None:
    33         aid = u"%s_%d" % (container.code, r().randint(99999,1000000))
    34         while aid in container.keys():
    35             aid = u"%s_%d" % (container.code, r().randint(99999,1000000))
    36         return aid
     33        key = r().randint(99999,1000000)
     34        while key in container.keys():
     35            key = r().randint(99999,1000000)
     36        return u"%s_%d" % (container.code, key)
    3737    else:
    3838        # In some tests we don't use containers
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py

    r8533 r8540  
    349349    date_of_birth = FormattedDate(
    350350        title = _(u'Date of Birth'),
    351         required = True,
     351        required = False,
    352352        #date_format = u'%d/%m/%Y', # Use grok-instance-wide default
    353353        show_year = True,
Note: See TracChangeset for help on using the changeset viewer.