~sircmpwn/todo.sr.ht

2687448c0925ce944923619d55d0240c87d84269 — Drew DeVault 4 months ago 809e294 0.61.9
Use last event when editing a comment, not only
1 files changed, 3 insertions(+), 1 deletions(-)

M todosrht/blueprints/ticket.py
M todosrht/blueprints/ticket.py => todosrht/blueprints/ticket.py +3 -1
@@ 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()