round knowledge fit value to two decimals

This commit is contained in:
Helmut Merz 2011-11-04 10:23:49 +01:00
parent 2336314310
commit 132206e823

View file

@ -182,7 +182,7 @@ class Task(BaseTask, KnowledgeAdapterMixin):
item['other'].append(k)
result.append(item)
for item in result:
item['fit'] /= len(reqs)
item['fit'] = round(item['fit'] / len(reqs), 2)
return sorted(result, key=lambda x: (-x['fit'], x['person'].title))