{"action":"created","issue":{"url":"https://api.github.com/repos/jeregrine/jsonapi/issues/26","labels_url":"https://api.github.com/repos/jeregrine/jsonapi/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/jeregrine/jsonapi/issues/26/comments","events_url":"https://api.github.com/repos/jeregrine/jsonapi/issues/26/events","html_url":"https://github.com/jeregrine/jsonapi/issues/26","id":123309585,"number":26,"title":"Errors in tests in example app, related to includes/relationships","user":{"login":"alexjp","id":85806,"avatar_url":"https://avatars.githubusercontent.com/u/85806?v=3","gravatar_id":"","url":"https://api.github.com/users/alexjp","html_url":"https://github.com/alexjp","followers_url":"https://api.github.com/users/alexjp/followers","following_url":"https://api.github.com/users/alexjp/following{/other_user}","gists_url":"https://api.github.com/users/alexjp/gists{/gist_id}","starred_url":"https://api.github.com/users/alexjp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexjp/subscriptions","organizations_url":"https://api.github.com/users/alexjp/orgs","repos_url":"https://api.github.com/users/alexjp/repos","events_url":"https://api.github.com/users/alexjp/events{/privacy}","received_events_url":"https://api.github.com/users/alexjp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-21T16:21:20Z","updated_at":"2015-12-22T22:13:42Z","closed_at":"2015-12-22T21:29:23Z","body":"Hi,\r\n\r\nWhen in branch overhaul, commenting the includes and relationships if the views, make all tests pass.\r\nWhen enabling includes and relationships in views ( in this case, users has one company, company has many users ), the following error appears:\r\n\r\n```\r\n[error] #PID<0.327.0> running JsonapiOverhaul.Endpoint terminated\r\nServer: localhost:4000 (http)\r\nRequest: GET /api/companies/1\r\n** (exit) an exception was raised:\r\n    ** (UndefinedFunctionError) undefined function: Enum.empty/1\r\n        (elixir) Enum.empty(nil)\r\n        lib/jsonapi/serializer.ex:51: anonymous fn/6 in JSONAPI.Serializer.encode_data/4\r\n        (elixir) lib/enum.ex:1102: Enum.\"-map_reduce/3-lists^mapfoldl/2-0-\"/3\r\n        lib/jsonapi/serializer.ex:17: JSONAPI.Serializer.serialize/3\r\n        (phoenix) lib/phoenix/view.ex:341: Phoenix.View.render_to_iodata/3\r\n        (phoenix) lib/phoenix/controller.ex:628: Phoenix.Controller.do_render/4\r\n        (jsonapi_overhaul) web/controllers/company_controller.ex:1: JsonapiOverhaul.CompanyController.action/2\r\n        (jsonapi_overhaul) web/controllers/company_controller.ex:1: JsonapiOverhaul.CompanyController.phoenix_controller_pipeline/2\r\n        (jsonapi_overhaul) lib/phoenix/router.ex:255: JsonapiOverhaul.Router.dispatch/2\r\n        (jsonapi_overhaul) web/router.ex:1: JsonapiOverhaul.Router.do_call/2\r\n        (jsonapi_overhaul) lib/jsonapi_overhaul/endpoint.ex:1: JsonapiOverhaul.Endpoint.phoenix_pipeline/1\r\n        (jsonapi_overhaul) lib/plug/debugger.ex:92: JsonapiOverhaul.Endpoint.\"call (overridable 3)\"/2\r\n        (jsonapi_overhaul) lib/phoenix/endpoint/render_errors.ex:34: JsonapiOverhaul.Endpoint.call/2\r\n        (plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4\r\n        (cowboy) src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4\r\n```\r\n\r\nThis could be related to the fact that on the tests, i am not filling out the relationships.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/jeregrine/jsonapi/issues/comments/166745479","html_url":"https://github.com/jeregrine/jsonapi/issues/26#issuecomment-166745479","issue_url":"https://api.github.com/repos/jeregrine/jsonapi/issues/26","id":166745479,"user":{"login":"alexjp","id":85806,"avatar_url":"https://avatars.githubusercontent.com/u/85806?v=3","gravatar_id":"","url":"https://api.github.com/users/alexjp","html_url":"https://github.com/alexjp","followers_url":"https://api.github.com/users/alexjp/followers","following_url":"https://api.github.com/users/alexjp/following{/other_user}","gists_url":"https://api.github.com/users/alexjp/gists{/gist_id}","starred_url":"https://api.github.com/users/alexjp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexjp/subscriptions","organizations_url":"https://api.github.com/users/alexjp/orgs","repos_url":"https://api.github.com/users/alexjp/repos","events_url":"https://api.github.com/users/alexjp/events{/privacy}","received_events_url":"https://api.github.com/users/alexjp/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T22:13:42Z","updated_at":"2015-12-22T22:13:42Z","body":"Thanks !!!"}}