Commit 5de7aa01eb730fccec27fd3b1b3a8a9c4cfe4551

Authored by Tomasz Bartosiak
1 parent ae00e34b

usunięcie powtórzeń

semantics/static/js/semantics_lexical_units.js
... ... @@ -331,7 +331,7 @@ function lexicalisationForm(lemma, pre, tokenised) {
331 331 }
332 332  
333 333 $.ajax({
334   - type: "GET",
  334 + type: "POST",
335 335 dataType: "json",
336 336 url: ajax_get_mwes,
337 337 data: {"options": JSON.stringify(list)},
... ...
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)
... ...