Changeset 6594


Ignore:
Timestamp:
11 Aug 2011, 09:28:06 (13 years ago)
Author:
uli
Message:

Remove unnecessary return. We use createWAeUPImageFile in order to get
an image file with an image id as data and not the raw binary file
data. Creating a WAeUPImageFile directly (WAeUPImageFile(filename,
filedata)) would mean to store the binary image data in the
WAeUPImageFile itself (and therefore in the ZODB).

File:
1 edited

Legend:

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

    r6538 r6594  
    3434from zope.security.interfaces import IGroupClosureAwarePrincipal as IPrincipal
    3535from zc.sourcefactory.basic import BasicSourceFactory
     36from waeup.sirp.image import createWAeUPImageFile
    3637from waeup.sirp.image.schema import ImageFile
    37 from waeup.sirp.image.image import WAeUPImageFile
    3838from waeup.sirp.interfaces import IWAeUPObject
    3939from waeup.sirp.university.vocabularies import application_categories
     
    5656    __doc__ = u"Invalid email address"
    5757
    58 check_email = re.compile(r"[a-zA-Z0-9._%-]+@([a-zA-Z0-9-]+.)*[a-zA-Z]{2,4}").match
     58check_email = re.compile(
     59    r"[a-zA-Z0-9._%-]+@([a-zA-Z0-9-]+.)*[a-zA-Z]{2,4}").match
    5960def validate_email(value):
    6061    if not check_email(value):
     
    7677    provider.
    7778    """
    78     from waeup.sirp.image import createWAeUPImageFile
    7979    imagefile = createWAeUPImageFile(
    8080        'placeholder_m.jpg',
     
    8282        )
    8383    return imagefile
    84     return WAeUPImageFile(
    85         'placeholder_m.jpg', DEFAULT_PASSPORT_IMAGE_MALE)
    8684
    8785class ApplicantContainerProviderSource(BasicSourceFactory):
Note: See TracChangeset for help on using the changeset viewer.