diff --git a/backend/dvadmin/utils/filters.py b/backend/dvadmin/utils/filters.py index 05c0dfb8b0b69beb68f1ba2d5b2f908427ffcb93..d09a8a1510e02c5922cfec34b22f098e678929f1 100644 --- a/backend/dvadmin/utils/filters.py +++ b/backend/dvadmin/utils/filters.py @@ -37,11 +37,11 @@ class CoreModelFilterBankend(BaseFilterBackend): if any([create_datetime_after, create_datetime_before, update_datetime_after, update_datetime_before]): create_filter = Q() if create_datetime_after and create_datetime_before: - create_filter &= Q(create_datetime__gte=create_datetime_after) & Q(create_datetime__lte=create_datetime_before) + create_filter &= Q(create_datetime__gte=create_datetime_after) & Q(create_datetime__lte=f'{create_datetime_before} 23:59:59') elif create_datetime_after: create_filter &= Q(create_datetime__gte=create_datetime_after) elif create_datetime_before: - create_filter &= Q(create_datetime__lte=create_datetime_before) + create_filter &= Q(create_datetime__lte=f'{create_datetime_before} 23:59:59') # 更新时间范围过滤条件 update_filter = Q()