Changeset 1110


Ignore:
Timestamp:
21 Dec 2006, 09:37:02 (18 years ago)
Author:
joachim
Message:

replace getattr with objectIds (in custom)

File:
1 edited

Legend:

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

    r1107 r1110  
    6060    action = "/clearance_edit_form"
    6161
    62 ##if result_edit_button:
    63 ##    dict = {}
    64 ##    for w in result_widgets:
    65 ##        if form.has_key("%s_s" % w):
    66 ##            v = getattr(clear_doc,w)
    67 ##            s = form.get("%s_s" % w)
    68 ##            g = form.get("%s_g" % w)
    69 ##            while 1:
    70 ##                if not s and g:
    71 ##                    break
    72 ##                i = 0
    73 ##                done = False
    74 ##                for sv,gv in v:
    75 ##                    if sv == s:
    76 ##                        done = True
    77 ##                        if not g:
    78 ##                            v.pop(i)
    79 ##                            break
    80 ##                        v[i] = (s,g)
    81 ##                        break
    82 ##                    i += 1
    83 ##                if done:
    84 ##                    break
    85 ##                if s and g:
    86 ##                    v.append((s,g))
    87 ##                break
    88 ##            dict[w] = v
    89 ##            #request.SESSION.set(w,v)
    90 ##    clear_doc.edit(mapping=dict)
    91 ##    args['portal_status_message'] = "Results updated"
    92 ##    url = clear.absolute_url() + action + '?' + urlencode(args)
    93 ##    REQUEST.RESPONSE.redirect(url)
    9462is_valid, ds = clear_doc.validate(request=REQUEST,
    9563                                schema_id = 'student_clearance',
     
    11583        if acknowledge and info['review_state'] == "clearance_pin_entered":
    11684            missing = False
     85            files = clear_doc.objectIds()
    11786            for scan in required_scans:
    118                 if not getattr(clear_doc,scan):
     87                if scan not in files:
    11988                    missing = True
    12089                    break
    12190            if not missing:
    122                 if not getattr(clear_doc,"age_dec") and\
    123                 not getattr(clear_doc,"birth_certificate"):
     91                if not "age_dec" in files and not "birth_certificate" in files:
    12492                    missing = True
    12593            if missing:
Note: See TracChangeset for help on using the changeset viewer.