{"action":"opened","issue":{"url":"https://api.github.com/repos/dulvie/emmy/issues/322","repository_url":"https://api.github.com/repos/dulvie/emmy","labels_url":"https://api.github.com/repos/dulvie/emmy/issues/322/labels{/name}","comments_url":"https://api.github.com/repos/dulvie/emmy/issues/322/comments","events_url":"https://api.github.com/repos/dulvie/emmy/issues/322/events","html_url":"https://github.com/dulvie/emmy/issues/322","id":330383825,"node_id":"MDU6SXNzdWUzMzAzODM4MjU=","number":322,"title":"Unable to send email due to issue with contact relation","user":{"login":"qzio","id":4088,"node_id":"MDQ6VXNlcjQwODg=","avatar_url":"https://avatars3.githubusercontent.com/u/4088?v=4","gravatar_id":"","url":"https://api.github.com/users/qzio","html_url":"https://github.com/qzio","followers_url":"https://api.github.com/users/qzio/followers","following_url":"https://api.github.com/users/qzio/following{/other_user}","gists_url":"https://api.github.com/users/qzio/gists{/gist_id}","starred_url":"https://api.github.com/users/qzio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qzio/subscriptions","organizations_url":"https://api.github.com/users/qzio/orgs","repos_url":"https://api.github.com/users/qzio/repos","events_url":"https://api.github.com/users/qzio/events{/privacy}","received_events_url":"https://api.github.com/users/qzio/received_events","type":"User","site_admin":false},"labels":[{"id":116630370,"node_id":"MDU6TGFiZWwxMTY2MzAzNzA=","url":"https://api.github.com/repos/dulvie/emmy/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-07T18:22:45Z","updated_at":"2018-06-07T18:22:45Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"While trying to send the invoice using an email template, the browser is redirected to a 404 and this is found in the logs:\r\n\r\n\r\n```\r\n2018-06-07T18:15:17.311756 #25909]  INFO -- :   Parameters: {\"utf8\"=>\"✓\", \"authenticity_token\"=>\"****\", \"return_path\"=>\"/AN_ORGANIZATION/sales?locale=se\", \"sale\"=>{\"mail_template\"=>\"1\"}, \"commit\"=>\"Bekräfta\", \"locale\"=>\"se\", \"organization_slug\"=>\"AN_ORGANIZATION\", \"id\"=>\"1234\"}\r\nI, [2018-06-07T18:15:17.338744 #25909]  INFO -- : Completed 401 Unauthorized in 27ms (ActiveRecord: 3.4ms)\r\nF, [2018-06-07T18:15:17.340440 #25909] FATAL -- :\r\nActiveRecord::RecordNotFound (Couldn't find all Contacts with 'id': (#<Contact:0x0000563dc8fee500>, #<Contact:0x0000563dc8fee2a8>) [WHERE \"contacts\".\"organization_id\" = ?] (found 1 results, but was looking for 2)):\r\n  app/mailers/invoice_mailer.rb:42:in `set_text' \r\n  app/mailers/invoice_mailer.rb:13:in `invoice_email'\r\n  app/models/sale.rb:342:in `send_invoice!'\r\n  app/controllers/sales_controller.rb:105:in `send_email'\r\n```\r\n\r\n"}}
{"actor":{"display_login":"qzio"}}