Use last event when editing a comment, not only
This commit is contained in:
parent
809e294ef0
commit
2687448c09
|
@ -263,7 +263,9 @@ def ticket_comment_edit_POST(owner, name, ticket_id, comment_id):
|
|||
})
|
||||
return render_template("edit-comment.html", comment=comment, **ctx)
|
||||
|
||||
event = Event.query.filter(Event.comment_id == comment.id).one_or_none()
|
||||
event = (Event.query
|
||||
.filter(Event.comment_id == comment.id)
|
||||
.order_by(Event.id.desc())).first()
|
||||
assert event is not None
|
||||
|
||||
new_comment = TicketComment()
|
||||
|
|
Loading…
Reference in New Issue