# HG changeset patch # User Thierry Florac # Date 1530514757 -7200 # Node ID 1c28c3f6aa99650c4e8efcafd6aa1fd8307238c0 # Parent c5dc7118d10268c47d85945aea68f548aeffd097 Updated PyAMS_utils "unique" API diff -r c5dc7118d102 -r 1c28c3f6aa99 src/pyams_thesaurus/rpc/json/__init__.py --- a/src/pyams_thesaurus/rpc/json/__init__.py Thu Jun 28 08:44:41 2018 +0200 +++ b/src/pyams_thesaurus/rpc/json/__init__.py Mon Jul 02 08:59:17 2018 +0200 @@ -55,7 +55,7 @@ return [{'id': term.label, 'text': term.title} for term in unique(thesaurus.find_terms(query, extract_name, exact=True, stemmed=True), - idfun=lambda x: x.title) + key=lambda x: x.title) if term.status != STATUS_ARCHIVED] @@ -68,5 +68,5 @@ return [{'id': term.label, 'text': term.label} for term in unique(thesaurus.find_terms(query, extract_name, exact=True, stemmed=True), - idfun=lambda x: x.label) + key=lambda x: x.label) if term.status != STATUS_ARCHIVED]