fix tickets

master
James Sigurðarson 2016-08-12 14:49:25 +01:00
parent 99edbc97ec
commit 02e3b73a8f
1 changed files with 2 additions and 2 deletions

View File

@ -16,10 +16,10 @@ def get_comments(ticket):
return TicketComment.select().where(TicketComment.ticket == ticket).order_by(TicketComment.time)
def create_ticket(team, summary, description):
return TroubleTicket.create(team=g.team, summary=summary, description=description, opened_at=datetime.now())
return TroubleTicket.create(team=team, summary=summary, description=description, opened_at=datetime.now())
def create_comment(ticket, user, comment):
TicketComment.create(ticket=ticket, comment_by=user.username, comment=request.form["comment"], time=datetime.now())
TicketComment.create(ticket=ticket, comment_by=user.username, comment=comment, time=datetime.now())
def open_ticket(ticket):
ticket.active = True