{"action":"created","issue":{"url":"https://api.github.com/repos/snipe/snipe-it/issues/1799","repository_url":"https://api.github.com/repos/snipe/snipe-it","labels_url":"https://api.github.com/repos/snipe/snipe-it/issues/1799/labels{/name}","comments_url":"https://api.github.com/repos/snipe/snipe-it/issues/1799/comments","events_url":"https://api.github.com/repos/snipe/snipe-it/issues/1799/events","html_url":"https://github.com/snipe/snipe-it/issues/1799","id":136449515,"number":1799,"title":"Accessories Are Broken","user":{"login":"SylentBobNJ","id":17278649,"avatar_url":"https://avatars.githubusercontent.com/u/17278649?v=3","gravatar_id":"","url":"https://api.github.com/users/SylentBobNJ","html_url":"https://github.com/SylentBobNJ","followers_url":"https://api.github.com/users/SylentBobNJ/followers","following_url":"https://api.github.com/users/SylentBobNJ/following{/other_user}","gists_url":"https://api.github.com/users/SylentBobNJ/gists{/gist_id}","starred_url":"https://api.github.com/users/SylentBobNJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SylentBobNJ/subscriptions","organizations_url":"https://api.github.com/users/SylentBobNJ/orgs","repos_url":"https://api.github.com/users/SylentBobNJ/repos","events_url":"https://api.github.com/users/SylentBobNJ/events{/privacy}","received_events_url":"https://api.github.com/users/SylentBobNJ/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/snipe/snipe-it/labels/not%20sure%20if%20bug","name":"not sure if bug","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-25T17:09:03Z","updated_at":"2016-02-25T22:50:16Z","closed_at":null,"body":"#### Expected Behavior\r\nClicking on 'Accessories' in the left menu should list all Accessories. Clearing the search box after searching should remove the query and show all Accessories.\r\n\r\n#### Actual Behavior\r\nThe content area shows the 'No results' message until something is searched that exists in the database. Then, the 'No results' message gets replaced with the results of the search, as expected. However, when the search box is cleared or a new search is made against a string that doesn't exist in the database (ie. ijasubd), it will produce the results of the last successful search instead. Clicking on the 'Accessories' link in the left menu will clear the results and produce the 'No Results' message once again.\r\n\r\n#### Before posting this issue, confirm/answer the following:\r\n- [ X] I have enabled debug mode\r\n\r\nI can provide whatever output you need to diagnose the issue.  I do notice an exception when the search box is cleared:\r\n\r\n`    Trying to get property of non-object/var/www/snipeit/app/controllers/admin/AccessoriesController.php#599ErrorException\r\n                $rows[] = array(\r\n                    'name'          => link_to('admin/accessories/'.$accessory->id.'/view', $accessory->name),\r\n                    'category'      => link_to('admin/settings/categories/'.$accessory->category->id.'/view', $accessory->category->name),\r\n                    'qty'           => $accessory->qty,\r\n                    'order_number'  => $accessory->order_number,\r\n                    'location'      => ($accessory->location) ? $accessory->location->name: '',\r\n`\r\n- [X] I have read [checked the Common Issues page](http://docs.snipeitapp.com/common-issues.html)\r\n- [X] I have read [the Getting Help Documentation](http://docs.snipeitapp.com/getting-help.html)\r\n\r\nThank you!"},"comment":{"url":"https://api.github.com/repos/snipe/snipe-it/issues/comments/189018435","html_url":"https://github.com/snipe/snipe-it/issues/1799#issuecomment-189018435","issue_url":"https://api.github.com/repos/snipe/snipe-it/issues/1799","id":189018435,"user":{"login":"SylentBobNJ","id":17278649,"avatar_url":"https://avatars.githubusercontent.com/u/17278649?v=3","gravatar_id":"","url":"https://api.github.com/users/SylentBobNJ","html_url":"https://github.com/SylentBobNJ","followers_url":"https://api.github.com/users/SylentBobNJ/followers","following_url":"https://api.github.com/users/SylentBobNJ/following{/other_user}","gists_url":"https://api.github.com/users/SylentBobNJ/gists{/gist_id}","starred_url":"https://api.github.com/users/SylentBobNJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SylentBobNJ/subscriptions","organizations_url":"https://api.github.com/users/SylentBobNJ/orgs","repos_url":"https://api.github.com/users/SylentBobNJ/repos","events_url":"https://api.github.com/users/SylentBobNJ/events{/privacy}","received_events_url":"https://api.github.com/users/SylentBobNJ/received_events","type":"User","site_admin":false},"created_at":"2016-02-25T22:50:16Z","updated_at":"2016-02-25T22:50:16Z","body":"Ok, I found the offending record, though I'm not sure what the issue was with it??  Here it is:\r\n`5,HP Color Laserjet Printer 4700 CP4005 4730 CM4730 Roller Jam Kit Premium,33,80,2,0,2/17/2016 9:39,2/17/2016 12:26,NULL,2,2/16/2016,24.28,115-8326395-6628217,1`"}}