fix: 格式看起来好看

pull/9627/head
jiangweidong 2023-02-19 20:27:25 +08:00
parent 7837a28200
commit 37f74d7d73
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ class ResourceActivityAPIView(generics.ListAPIView):
q, user = Q(resource_id=resource_id), None
if is_uuid(resource_id):
user = User.objects.filter(id=resource_id).first()
if user:
if user is not None:
q |= Q(user=str(user))
queryset = OperateLog.objects.filter(q).annotate(
r_type=Value(ActivityChoices.operate_log, CharField()),