Changeset 11664


Ignore:
Timestamp:
26 May 2014, 10:21:17 (11 years ago)
Author:
Henrik Bettermann
Message:

Sort ContextualDictSource? by dictionary values not by keys.

Location:
main/waeup.kofa/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/CHANGES.txt

    r11661 r11664  
    441.2dev (unreleased)
    55===================
     6
     7* Sort ContextualDictSource by dictionary values not by keys.
    68
    79* Add regular school fee and balance payments when exporting payments
  • main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py

    r11589 r11664  
    113113    def getValues(self, context):
    114114        utils = getUtility(IKofaUtils)
    115         return sorted(getattr(utils, self.DICT_NAME).keys())
     115        sorted_items = sorted(getattr(utils, self.DICT_NAME).items(),
     116                              key=lambda item: item[1])
     117        return [item[0] for item in sorted_items]
    116118
    117119    def getToken(self, context, value):
Note: See TracChangeset for help on using the changeset viewer.