Changeset 1395 for WAeUP_SRP/trunk


Ignore:
Timestamp:
6 Feb 2007, 00:20:35 (18 years ago)
Author:
joachim
Message:

display unused pins in all cases

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/ScratchCards.py

    r1120 r1395  
    136136              } for p in pins_cat.searchResults(prefix_batch = "%s%d"
    137137                                               % (doc.prefix,doc.batch_no),
    138                                                )[-max_pins:] if not p.student]
     138                                               ) if not p.student]
     139        if len(unused) > max_pins:
     140            return unused[-max_pins:]
    139141        return unused
    140 
     142   
    141143    security.declareProtected(View,"getUsedPins")
    142144    def getUsedPins(self):
Note: See TracChangeset for help on using the changeset viewer.