Skip to content

Commit

Permalink
fix #214 - events api
Browse files Browse the repository at this point in the history
  • Loading branch information
matejkramny committed Dec 21, 2016
1 parent 6731829 commit eced2a7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ func getEvents(c *gin.Context) {

switch *evt.ObjectType {
case "task":
q = squirrel.Select("tpl.playbook as name").
q = squirrel.Select("case when length(task.playbook) > 0 then task.playbook else tpl.playbook end").
From("task").
Join("project__template as tpl on task.template_id=tpl.id")
Join("project__template as tpl on task.template_id=tpl.id").
Where("task.id=?", evt.ObjectID)
default:
continue
}
Expand Down

0 comments on commit eced2a7

Please sign in to comment.