Ignore:
Timestamp:
13 Jun 2016, 00:47:32 (8 years ago)
Author:
uli
Message:

We can define formvals much shorter.

zip() is a (bit hidden) treasure of Python.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/uli-scores-upload/src/waeup/kofa/students/browser.py

    r13922 r13923  
    31283128            if not editable_tickets:
    31293129                return
    3130             scores = form['scores']
    3131             sids = form['sids']
    3132             formvals = dict([(sids[i], scores[i]) for i in range(len(sids))])
     3130            formvals = dict(zip(form['sids'], form['scores']))
    31333131            for ticket in editable_tickets:
    31343132                score = ticket.score
Note: See TracChangeset for help on using the changeset viewer.