event list bug

This commit is contained in:
曹前明 2022-07-02 16:17:29 +08:00
parent c9dd869aa4
commit 6231e09a30
1 changed files with 2 additions and 1 deletions

View File

@ -58,7 +58,8 @@ class EventViewSet(ListModelMixin, RetrieveModelMixin, CustomGenericViewSet):
perms_map = {'get': 'event:view'}
queryset = Event.objects.all()
serializer_class = EventSerializer
select_related_fields = ['area', 'cate', 'handle_people', 'handle_user']
select_related_fields = ['area', 'employee', 'handle_user']
prefetch_related_fields = ['cates']
@transaction.atomic
@action(methods=['post'], detail=True, perms_map={'post': 'event:handle'},