Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/views/documents/_document.json.jbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ json.set! :creator do
json.extract! document.user, :id, :name
end
json.set! :project do
json.extract! document.project, :id, :name
if document.project
json.extract! document.project, :id, :name
end
end
json.set! :tags do
json.array! document.tags, :id, :name
Expand Down
4 changes: 3 additions & 1 deletion app/views/tasks/_task.json.jbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ json.set! :assigner do
json.extract! task.assigner, :id, :name
end
json.set! :project do
json.extract! task.project, :id, :name
if task.project
json.extract! task.project, :id, :name
end
end
json.set! :tags do
json.array! task.tags, :id, :name
Expand Down