fix sorting
parent
97ad7d6302
commit
dbb9bb5953
2
app.py
2
app.py
|
@ -302,7 +302,7 @@ def team_ticket_detail(ticket):
|
|||
flash("That's not your ticket.")
|
||||
return redirect(url_for("team_tickets"))
|
||||
|
||||
comments = TicketComment.select().where(TicketComment.ticket == ticket).order_by(TicketComment.time.desc())
|
||||
comments = TicketComment.select().where(TicketComment.ticket == ticket).order_by(TicketComment.time)
|
||||
return render_template("ticket_detail.html", ticket=ticket, comments=comments)
|
||||
|
||||
@app.route('/tickets/<int:ticket>/comment/', methods=["POST"])
|
||||
|
|
|
@ -63,7 +63,7 @@ def admin_tickets():
|
|||
@admin_required
|
||||
def admin_ticket_detail(ticket):
|
||||
ticket = TroubleTicket.get(TroubleTicket.id == ticket)
|
||||
comments = list(TicketComment.select().where(TicketComment.ticket == ticket))
|
||||
comments = list(TicketComment.select().where(TicketComment.ticket == ticket).order_by(TicketComment.time))
|
||||
return render_template("admin/ticket_detail.html", ticket=ticket, comments=comments)
|
||||
|
||||
@admin.route("/tickets/<int:ticket>/comment/", methods=["POST"])
|
||||
|
|
Loading…
Reference in New Issue