Commit 5de7aa01eb730fccec27fd3b1b3a8a9c4cfe4551
1 parent
ae00e34b
usunięcie powtórzeń
Showing
2 changed files
with
4 additions
and
3 deletions
semantics/static/js/semantics_lexical_units.js
semantics/views.py
... | ... | @@ -646,10 +646,11 @@ def relational_preference_form(request): |
646 | 646 | form = RelationalSelPrefForm() |
647 | 647 | return {'form': form} |
648 | 648 | |
649 | -@ajax(method='get', encode_result=True) | |
649 | +@ajax(method='post', encode_result=True) | |
650 | 650 | def ajax_get_mwes(request, options): |
651 | 651 | results = [] |
652 | - for term in options: | |
652 | + bases = sorted(list(set(options))) | |
653 | + for term in bases: | |
653 | 654 | term = unicode(term) |
654 | 655 | if len(term) > 0: |
655 | 656 | obj_results = LexicalUnit.objects.filter(base=term) |
... | ... |