{"action":"created","issue":{"url":"https://api.github.com/repos/spree-contrib/spree_print_invoice/issues/112","repository_url":"https://api.github.com/repos/spree-contrib/spree_print_invoice","labels_url":"https://api.github.com/repos/spree-contrib/spree_print_invoice/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/spree-contrib/spree_print_invoice/issues/112/comments","events_url":"https://api.github.com/repos/spree-contrib/spree_print_invoice/issues/112/events","html_url":"https://github.com/spree-contrib/spree_print_invoice/issues/112","id":183283052,"number":112,"title":"ArgumentError Exception: wrong number of arguments","user":{"login":"bonekost","id":13746666,"avatar_url":"https://avatars.githubusercontent.com/u/13746666?v=3","gravatar_id":"","url":"https://api.github.com/users/bonekost","html_url":"https://github.com/bonekost","followers_url":"https://api.github.com/users/bonekost/followers","following_url":"https://api.github.com/users/bonekost/following{/other_user}","gists_url":"https://api.github.com/users/bonekost/gists{/gist_id}","starred_url":"https://api.github.com/users/bonekost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonekost/subscriptions","organizations_url":"https://api.github.com/users/bonekost/orgs","repos_url":"https://api.github.com/users/bonekost/repos","events_url":"https://api.github.com/users/bonekost/events{/privacy}","received_events_url":"https://api.github.com/users/bonekost/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-16T18:41:33Z","updated_at":"2016-10-17T09:58:20Z","closed_at":null,"body":"Hey,\r\nafter implementing gem `spree_print_invoice` I got error after trying make second order. (first order is OK)\r\nError appears after cart step.\r\n\r\n```\r\nSQL (2.8ms)  DELETE FROM \"spree_adjustments\" WHERE \"spree_adjustments\".\"order_id\" = ? AND \"spree_adjustments\".\"adjustable_type\" = ?  [[\"order_id\", 9], [\"adjustable_type\", \"Spree::Shipment\"]]\r\n  Spree::Shipment Load (0.2ms)  SELECT \"spree_shipments\".* FROM \"spree_shipments\" WHERE \"spree_shipments\".\"order_id\" = ?  [[\"order_id\", 9]]\r\n  Spree::Variant Load (0.1ms)  SELECT \"spree_variants\".* FROM \"spree_variants\" INNER JOIN \"spree_assemblies_parts\" ON \"spree_variants\".\"id\" = \"spree_assemblies_parts\".\"part_id\" INNER JOIN \"spree_variants\" \"variants_including_masters_parts_join\" ON \"spree_assemblies_parts\".\"assembly_id\" = \"variants_including_masters_parts_join\".\"id\" WHERE \"spree_variants\".\"deleted_at\" IS NULL AND \"variants_including_masters_parts_join\".\"product_id\" = ?  ORDER BY \"spree_variants\".\"position\" ASC  [[\"product_id\", 1]]\r\n  Spree::StockLocation Load (0.4ms)  SELECT \"spree_stock_locations\".* FROM \"spree_stock_locations\" INNER JOIN \"spree_stock_items\" ON \"spree_stock_items\".\"stock_location_id\" = \"spree_stock_locations\".\"id\" AND \"spree_stock_items\".\"deleted_at\" IS NULL WHERE \"spree_stock_locations\".\"active\" = ? AND \"spree_stock_items\".\"variant_id\" = 1  [[\"active\", \"t\"]]\r\n  Spree::StockItem Load (0.5ms)  SELECT  \"spree_stock_items\".* FROM \"spree_stock_items\" WHERE \"spree_stock_items\".\"deleted_at\" IS NULL AND \"spree_stock_items\".\"stock_location_id\" = ? AND \"spree_stock_items\".\"variant_id\" = 1  ORDER BY \"spree_stock_items\".\"id\" ASC LIMIT 1  [[\"stock_location_id\", 1]]\r\n  CACHE (0.0ms)  SELECT  \"spree_stock_items\".* FROM \"spree_stock_items\" WHERE \"spree_stock_items\".\"deleted_at\" IS NULL AND \"spree_stock_items\".\"stock_location_id\" = ? AND \"spree_stock_items\".\"variant_id\" = 1  ORDER BY \"spree_stock_items\".\"id\" ASC LIMIT 1  [[\"stock_location_id\", 1]]\r\n*** ArgumentError Exception: wrong number of arguments (3 for 1)\r\n```\r\nAfter restarting server I can make new order and everything is OK until next order.\r\nspree 3.1\r\nrails 4.2.6\r\n\r\n**Update 1:**\r\nAfter commenting out `before_transition` in model everything works fine excepted that invoices are not generated.\r\n```\r\n#spree_print_invoice/app/models/spree/oreder_decorator.rb\r\n...\r\n# state_machine.before_transition to: :complete, do: :invoice_for_order\r\n...\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/spree-contrib/spree_print_invoice/issues/comments/254164720","html_url":"https://github.com/spree-contrib/spree_print_invoice/issues/112#issuecomment-254164720","issue_url":"https://api.github.com/repos/spree-contrib/spree_print_invoice/issues/112","id":254164720,"user":{"login":"magic-stick-420","id":22275783,"avatar_url":"https://avatars.githubusercontent.com/u/22275783?v=3","gravatar_id":"","url":"https://api.github.com/users/magic-stick-420","html_url":"https://github.com/magic-stick-420","followers_url":"https://api.github.com/users/magic-stick-420/followers","following_url":"https://api.github.com/users/magic-stick-420/following{/other_user}","gists_url":"https://api.github.com/users/magic-stick-420/gists{/gist_id}","starred_url":"https://api.github.com/users/magic-stick-420/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magic-stick-420/subscriptions","organizations_url":"https://api.github.com/users/magic-stick-420/orgs","repos_url":"https://api.github.com/users/magic-stick-420/repos","events_url":"https://api.github.com/users/magic-stick-420/events{/privacy}","received_events_url":"https://api.github.com/users/magic-stick-420/received_events","type":"User","site_admin":false},"created_at":"2016-10-17T09:58:20Z","updated_at":"2016-10-17T09:58:20Z","body":"Change `before_transition` to `after_transition`. It helps me."}}
{"actor":{"display_login":"magic-stick-420"}}