diff options
-rw-r--r-- | ishtar/furnitures/forms.py | 4 | ||||
-rw-r--r-- | ishtar/furnitures/views.py | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/ishtar/furnitures/forms.py b/ishtar/furnitures/forms.py index 1e9642072..a45c564af 100644 --- a/ishtar/furnitures/forms.py +++ b/ishtar/furnitures/forms.py @@ -1146,7 +1146,9 @@ class OperationFormGeneral(forms.Form): currents = {'associated_file':models.File} in_charge = forms.IntegerField(label=_("Person in charge of the operation"), widget=widgets.JQueryAutoComplete(reverse_lazy('autocomplete-person', - args=[models.PersonType.objects.get(txt_idx='head_scientist').pk]), + args=["_".join( + [unicode(models.PersonType.objects.get(txt_idx='head_scientist').pk), + unicode(models.PersonType.objects.get(txt_idx='sra_agent').pk)])]), associated_model=models.Person), validators=[models.valid_id(models.Person)]) associated_file = forms.IntegerField(label=_("Archaelogical file"), diff --git a/ishtar/furnitures/views.py b/ishtar/furnitures/views.py index 041ebfb76..591ead231 100644 --- a/ishtar/furnitures/views.py +++ b/ishtar/furnitures/views.py @@ -70,6 +70,7 @@ def autocomplete_person(request, person_type=None): for q in q.split(' '): query = query & (Q(name__istartswith=q) | Q(surname__istartswith=q) | \ Q(email__icontains=q)) + print person_type if person_type: try: typs = [int(tp) for tp in person_type.split('_') if tp] |