perms_map bug
This commit is contained in:
parent
2ec6f45525
commit
5e420e9428
|
@ -63,6 +63,7 @@ class EventViewSet(ListModelMixin, RetrieveModelMixin, CustomGenericViewSet):
|
|||
serializer_class = EventSerializer
|
||||
select_related_fields = ['area', 'employee', 'handle_user']
|
||||
prefetch_related_fields = ['cates']
|
||||
filterset_fields = ['cates']
|
||||
|
||||
@transaction.atomic
|
||||
@action(methods=['post'], detail=True, perms_map={'post': 'event:handle'},
|
||||
|
|
|
@ -20,7 +20,7 @@ def get_user_perms_map(user):
|
|||
objs = UserPost.objects.filter(user=user)
|
||||
for i in objs:
|
||||
dept_id = str(i.dept.id)
|
||||
for pr in PostRole.objects.filter(post=i.post).exists():
|
||||
for pr in PostRole.objects.filter(post=i.post):
|
||||
"""
|
||||
岗位角色
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue