Changeset 6313


Ignore:
Timestamp:
9 Jun 2011, 23:58:39 (14 years ago)
Author:
uli
Message:
  • Make passport image placeholder constants strings instead of WAeUPImageFile instances. It turned out that defining WAeUPImageFile instances as constants gives some nasty (although most probably harmless) error messages at end of test runs.
  • Adapt the default value provider for passport fieds appropriately.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/interfaces.py

    r6304 r6313  
    4747    'static'
    4848    )
    49 DEFAULT_PASSPORT_IMAGE_MALE = WAeUPImageFile(
    50     'passport.jpg',
    51     open(os.path.join(IMAGE_PATH, 'placeholder_m.jpg')).read(),
    52     )
    53 DEFAULT_PASSPORT_IMAGE_FEMALE = WAeUPImageFile(
    54     'passport.jpg',
    55     open(os.path.join(IMAGE_PATH, 'placeholder_f.jpg')).read(),
    56     )
     49DEFAULT_PASSPORT_IMAGE_MALE = open(
     50    os.path.join(IMAGE_PATH, 'placeholder_m.jpg')).read()
     51DEFAULT_PASSPORT_IMAGE_FEMALE = open(
     52    os.path.join(IMAGE_PATH, 'placeholder_f.jpg')).read()
    5753
    5854@provider(schema.interfaces.IContextAwareDefaultFactory)
     
    7066    provider.
    7167    """
    72     return DEFAULT_PASSPORT_IMAGE_MALE
     68    return WAeUPImageFile(
     69        'placeholder_m.jpg', DEFAULT_PASSPORT_IMAGE_MALE)
    7370
    7471class ApplicantContainerProviderSource(BasicSourceFactory):
Note: See TracChangeset for help on using the changeset viewer.