Skip to content

Commit

Permalink
我的预约界面长期预约排序 #891
Browse files Browse the repository at this point in the history
之前没有排序,所以在最上面的是最早创建的长期预约。让最近创建的在最上面更加方便。
  • Loading branch information
Deophius authored Feb 18, 2025
1 parent 08fffa0 commit db1c9bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Appointment/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def account(request: HttpRequest):
# 获取长期预约数据
appoint_list_longterm = []
longterm_appoints = LongTermAppoint.objects.filter(
applicant=participant)
applicant=participant).order_by('-appoint__Astart')
# 判断是否达到上限
count = LongTermAppoint.objects.activated().filter(applicant=participant).count()
is_full = count >= CONFIG.longterm_max_num
Expand Down

0 comments on commit db1c9bc

Please sign in to comment.