diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-23 18:25:58 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-23 18:25:58 +0200 |
commit | 7be596f41305b4be26796625bd800d58a04bb0a7 (patch) | |
tree | 9743bec37b2c651fafecfc373a1d5bb8bc2aadc3 /archaeological_operations/views.py | |
parent | ed74b751839d42d30a74b0d67a47ae138a537377 (diff) | |
download | Ishtar-7be596f41305b4be26796625bd800d58a04bb0a7.tar.bz2 Ishtar-7be596f41305b4be26796625bd800d58a04bb0a7.zip |
PersonType from single value to multi value for Person
Diffstat (limited to 'archaeological_operations/views.py')
-rw-r--r-- | archaeological_operations/views.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index c2e0b135c..97446b635 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -31,13 +31,11 @@ from forms import * import models def autocomplete_patriarche(request, non_closed=True): - person_types = request.user.ishtaruser.person.person_type if (not request.user.has_perm('ishtar_common.view_operation', models.Operation) and not request.user.has_perm('ishtar_common.view_own_operation', models.Operation) - and not person_types.rights.filter( - wizard__url_name='operation_search').count()): + and not request.user.ishtaruser.has_right('operation_search')): return HttpResponse(mimetype='text/plain') if not request.GET.get('term'): return HttpResponse(mimetype='text/plain') @@ -60,8 +58,7 @@ def autocomplete_operation(request, non_closed=True): models.Operation) and not request.user.has_perm('ishtar_common.view_own_operation', models.Operation) - and not person_types.rights.filter( - wizard__url_name='operation_search').count()): + and not request.user.ishtaruser.has_right('operation_search')): return HttpResponse(mimetype='text/plain') if not request.GET.get('term'): return HttpResponse(mimetype='text/plain') |