Ignore:
Timestamp:
10 Jan 2007, 00:24:40 (18 years ago)
Author:
joachim
Message:

increaselevels

Location:
WAeUP_SRP/trunk/skins/waeup_student
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/getAccommodationInfo.py

    r1249 r1255  
    5858                    )
    5959s_brain = res[0]
     60info['error'] = None
    6061info['matric_no']=s_brain.matric_no
    6162info['jamb_reg_no']=s_brain.jamb_reg_no
     
    100101        #from Products.zdb import set_trace; set_trace()
    101102        certificate = c_brain.getObject().getContent()
    102         if int(s_brain.level) +100 == int(certificate.end_level):
     103        try:
     104            certlevel = int(certificate.end_level)
     105        except:
     106            info["error"] = '"no end_level for","%s"' % c_brain.getId
     107            return info
     108        try:
     109            studentlevel = int(s_brain.level) + 100
     110        except:
     111            info["error"] = '"no level for","%s"' % s_brain.getId
     112            return info
     113        if studentlevel >= certlevel:
    103114            bt = "fi"
    104115d['sex'] = 'male'
  • WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py

    r1183 r1255  
    5353                      button = button
    5454                      )
    55 if psm == 'invalid':
     55if psm == 'invalid' or info['error'] is not None:
     56    member_id = str(context.portal_membership.getAuthenticatedMember())
     57    logger.info('"%s", %s' % (member_id,info['error'] ))
     58    if psm == 'invalid':
     59        psm = "please correct your input"
     60    else:
     61        psm = "Error in Data, unable to reserve bed."
    5662    return context.accommodation_pin_edit_form(rendered = res,
    57                                  psm = "Please correct your input!",
    5863                                 #psm = "%s, %s" % (psm,ds),
    5964                                 mode = mode,
Note: See TracChangeset for help on using the changeset viewer.