{"action":"created","comment":{"url":"https://api.github.com/repos/svobodni/ballot_box/pulls/comments/48688206","id":48688206,"diff_hunk":"@@ -44,13 +58,19 @@ def decorated_function(*args, **kwargs):\n         if g.get(\"user\", None) is None:\n             conn_id = session.get(\"conn_id\", False)\n             conn_token = session.get(\"conn_token\", False)\n+\n             if conn_id and conn_token:\n-                conn = (db.session.query(Connection)\n-                        .filter(Connection.id == conn_id)\n-                        .filter(Connection.token == conn_token)\n-                        .filter(Connection.remote_addr == request.remote_addr)\n-                        .filter(Connection.last_click > datetime.datetime.now()-app.config[\"LOGIN_TIMEOUT\"])\n-                        .first())\n+                conn = db.session.query(Connection).filter(","path":"ballot_box/views.py","position":78,"original_position":78,"commit_id":"5c846488029dc6b058a7cd2ee6d5dfb2438eb294","original_commit_id":"5c846488029dc6b058a7cd2ee6d5dfb2438eb294","user":{"login":"cocosx","id":659392,"avatar_url":"https://avatars.githubusercontent.com/u/659392?v=3","gravatar_id":"","url":"https://api.github.com/users/cocosx","html_url":"https://github.com/cocosx","followers_url":"https://api.github.com/users/cocosx/followers","following_url":"https://api.github.com/users/cocosx/following{/other_user}","gists_url":"https://api.github.com/users/cocosx/gists{/gist_id}","starred_url":"https://api.github.com/users/cocosx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocosx/subscriptions","organizations_url":"https://api.github.com/users/cocosx/orgs","repos_url":"https://api.github.com/users/cocosx/repos","events_url":"https://api.github.com/users/cocosx/events{/privacy}","received_events_url":"https://api.github.com/users/cocosx/received_events","type":"User","site_admin":false},"body":"Toto formatovani mi pripada jako zhorseni.","created_at":"2016-01-02T22:27:53Z","updated_at":"2016-01-02T22:27:53Z","html_url":"https://github.com/svobodni/ballot_box/pull/30#discussion_r48688206","pull_request_url":"https://api.github.com/repos/svobodni/ballot_box/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/svobodni/ballot_box/pulls/comments/48688206"},"html":{"href":"https://github.com/svobodni/ballot_box/pull/30#discussion_r48688206"},"pull_request":{"href":"https://api.github.com/repos/svobodni/ballot_box/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/svobodni/ballot_box/pulls/30","id":54911395,"html_url":"https://github.com/svobodni/ballot_box/pull/30","diff_url":"https://github.com/svobodni/ballot_box/pull/30.diff","patch_url":"https://github.com/svobodni/ballot_box/pull/30.patch","issue_url":"https://api.github.com/repos/svobodni/ballot_box/issues/30","number":30,"state":"open","locked":false,"title":"Refactoring","user":{"login":"dqd","id":574700,"avatar_url":"https://avatars.githubusercontent.com/u/574700?v=3","gravatar_id":"","url":"https://api.github.com/users/dqd","html_url":"https://github.com/dqd","followers_url":"https://api.github.com/users/dqd/followers","following_url":"https://api.github.com/users/dqd/following{/other_user}","gists_url":"https://api.github.com/users/dqd/gists{/gist_id}","starred_url":"https://api.github.com/users/dqd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dqd/subscriptions","organizations_url":"https://api.github.com/users/dqd/orgs","repos_url":"https://api.github.com/users/dqd/repos","events_url":"https://api.github.com/users/dqd/events{/privacy}","received_events_url":"https://api.github.com/users/dqd/received_events","type":"User","site_admin":false},"body":"Přidal jsem program `flake8`, který kontroluje kompatibilitu se standardem PEP 8 a také analyzuje chyby v kódu (linting). Kód jsem tomu přizpůsobil, funkcionalita však zůstala stejná.","created_at":"2016-01-02T19:46:40Z","updated_at":"2016-01-02T22:27:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"319345a67182392338a5efff9d9bbd21f5343ce4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/svobodni/ballot_box/pulls/30/commits","review_comments_url":"https://api.github.com/repos/svobodni/ballot_box/pulls/30/comments","review_comment_url":"https://api.github.com/repos/svobodni/ballot_box/pulls/comments{/number}","comments_url":"https://api.github.com/repos/svobodni/ballot_box/issues/30/comments","statuses_url":"https://api.github.com/repos/svobodni/ballot_box/statuses/5c846488029dc6b058a7cd2ee6d5dfb2438eb294","head":{"label":"dqd:refactoring","ref":"refactoring","sha":"5c846488029dc6b058a7cd2ee6d5dfb2438eb294","user":{"login":"dqd","id":574700,"avatar_url":"https://avatars.githubusercontent.com/u/574700?v=3","gravatar_id":"","url":"https://api.github.com/users/dqd","html_url":"https://github.com/dqd","followers_url":"https://api.github.com/users/dqd/followers","following_url":"https://api.github.com/users/dqd/following{/other_user}","gists_url":"https://api.github.com/users/dqd/gists{/gist_id}","starred_url":"https://api.github.com/users/dqd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dqd/subscriptions","organizations_url":"https://api.github.com/users/dqd/orgs","repos_url":"https://api.github.com/users/dqd/repos","events_url":"https://api.github.com/users/dqd/events{/privacy}","received_events_url":"https://api.github.com/users/dqd/received_events","type":"User","site_admin":false},"repo":{"id":37404286,"name":"ballot_box","full_name":"dqd/ballot_box","owner":{"login":"dqd","id":574700,"avatar_url":"https://avatars.githubusercontent.com/u/574700?v=3","gravatar_id":"","url":"https://api.github.com/users/dqd","html_url":"https://github.com/dqd","followers_url":"https://api.github.com/users/dqd/followers","following_url":"https://api.github.com/users/dqd/following{/other_user}","gists_url":"https://api.github.com/users/dqd/gists{/gist_id}","starred_url":"https://api.github.com/users/dqd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dqd/subscriptions","organizations_url":"https://api.github.com/users/dqd/orgs","repos_url":"https://api.github.com/users/dqd/repos","events_url":"https://api.github.com/users/dqd/events{/privacy}","received_events_url":"https://api.github.com/users/dqd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dqd/ballot_box","description":"Volební systém využívající nový registr","fork":true,"url":"https://api.github.com/repos/dqd/ballot_box","forks_url":"https://api.github.com/repos/dqd/ballot_box/forks","keys_url":"https://api.github.com/repos/dqd/ballot_box/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dqd/ballot_box/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dqd/ballot_box/teams","hooks_url":"https://api.github.com/repos/dqd/ballot_box/hooks","issue_events_url":"https://api.github.com/repos/dqd/ballot_box/issues/events{/number}","events_url":"https://api.github.com/repos/dqd/ballot_box/events","assignees_url":"https://api.github.com/repos/dqd/ballot_box/assignees{/user}","branches_url":"https://api.github.com/repos/dqd/ballot_box/branches{/branch}","tags_url":"https://api.github.com/repos/dqd/ballot_box/tags","blobs_url":"https://api.github.com/repos/dqd/ballot_box/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dqd/ballot_box/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dqd/ballot_box/git/refs{/sha}","trees_url":"https://api.github.com/repos/dqd/ballot_box/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dqd/ballot_box/statuses/{sha}","languages_url":"https://api.github.com/repos/dqd/ballot_box/languages","stargazers_url":"https://api.github.com/repos/dqd/ballot_box/stargazers","contributors_url":"https://api.github.com/repos/dqd/ballot_box/contributors","subscribers_url":"https://api.github.com/repos/dqd/ballot_box/subscribers","subscription_url":"https://api.github.com/repos/dqd/ballot_box/subscription","commits_url":"https://api.github.com/repos/dqd/ballot_box/commits{/sha}","git_commits_url":"https://api.github.com/repos/dqd/ballot_box/git/commits{/sha}","comments_url":"https://api.github.com/repos/dqd/ballot_box/comments{/number}","issue_comment_url":"https://api.github.com/repos/dqd/ballot_box/issues/comments{/number}","contents_url":"https://api.github.com/repos/dqd/ballot_box/contents/{+path}","compare_url":"https://api.github.com/repos/dqd/ballot_box/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dqd/ballot_box/merges","archive_url":"https://api.github.com/repos/dqd/ballot_box/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dqd/ballot_box/downloads","issues_url":"https://api.github.com/repos/dqd/ballot_box/issues{/number}","pulls_url":"https://api.github.com/repos/dqd/ballot_box/pulls{/number}","milestones_url":"https://api.github.com/repos/dqd/ballot_box/milestones{/number}","notifications_url":"https://api.github.com/repos/dqd/ballot_box/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dqd/ballot_box/labels{/name}","releases_url":"https://api.github.com/repos/dqd/ballot_box/releases{/id}","created_at":"2015-06-14T08:03:54Z","updated_at":"2015-06-14T08:03:55Z","pushed_at":"2016-01-02T21:06:23Z","git_url":"git://github.com/dqd/ballot_box.git","ssh_url":"git@github.com:dqd/ballot_box.git","clone_url":"https://github.com/dqd/ballot_box.git","svn_url":"https://github.com/dqd/ballot_box","homepage":"","size":100,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"svobodni:master","ref":"master","sha":"9833029f2011af351ec126b40eb8b1402c783b7e","user":{"login":"svobodni","id":5666713,"avatar_url":"https://avatars.githubusercontent.com/u/5666713?v=3","gravatar_id":"","url":"https://api.github.com/users/svobodni","html_url":"https://github.com/svobodni","followers_url":"https://api.github.com/users/svobodni/followers","following_url":"https://api.github.com/users/svobodni/following{/other_user}","gists_url":"https://api.github.com/users/svobodni/gists{/gist_id}","starred_url":"https://api.github.com/users/svobodni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svobodni/subscriptions","organizations_url":"https://api.github.com/users/svobodni/orgs","repos_url":"https://api.github.com/users/svobodni/repos","events_url":"https://api.github.com/users/svobodni/events{/privacy}","received_events_url":"https://api.github.com/users/svobodni/received_events","type":"Organization","site_admin":false},"repo":{"id":26979243,"name":"ballot_box","full_name":"svobodni/ballot_box","owner":{"login":"svobodni","id":5666713,"avatar_url":"https://avatars.githubusercontent.com/u/5666713?v=3","gravatar_id":"","url":"https://api.github.com/users/svobodni","html_url":"https://github.com/svobodni","followers_url":"https://api.github.com/users/svobodni/followers","following_url":"https://api.github.com/users/svobodni/following{/other_user}","gists_url":"https://api.github.com/users/svobodni/gists{/gist_id}","starred_url":"https://api.github.com/users/svobodni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svobodni/subscriptions","organizations_url":"https://api.github.com/users/svobodni/orgs","repos_url":"https://api.github.com/users/svobodni/repos","events_url":"https://api.github.com/users/svobodni/events{/privacy}","received_events_url":"https://api.github.com/users/svobodni/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/svobodni/ballot_box","description":"Volební systém využívající nový registr","fork":false,"url":"https://api.github.com/repos/svobodni/ballot_box","forks_url":"https://api.github.com/repos/svobodni/ballot_box/forks","keys_url":"https://api.github.com/repos/svobodni/ballot_box/keys{/key_id}","collaborators_url":"https://api.github.com/repos/svobodni/ballot_box/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/svobodni/ballot_box/teams","hooks_url":"https://api.github.com/repos/svobodni/ballot_box/hooks","issue_events_url":"https://api.github.com/repos/svobodni/ballot_box/issues/events{/number}","events_url":"https://api.github.com/repos/svobodni/ballot_box/events","assignees_url":"https://api.github.com/repos/svobodni/ballot_box/assignees{/user}","branches_url":"https://api.github.com/repos/svobodni/ballot_box/branches{/branch}","tags_url":"https://api.github.com/repos/svobodni/ballot_box/tags","blobs_url":"https://api.github.com/repos/svobodni/ballot_box/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/svobodni/ballot_box/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/svobodni/ballot_box/git/refs{/sha}","trees_url":"https://api.github.com/repos/svobodni/ballot_box/git/trees{/sha}","statuses_url":"https://api.github.com/repos/svobodni/ballot_box/statuses/{sha}","languages_url":"https://api.github.com/repos/svobodni/ballot_box/languages","stargazers_url":"https://api.github.com/repos/svobodni/ballot_box/stargazers","contributors_url":"https://api.github.com/repos/svobodni/ballot_box/contributors","subscribers_url":"https://api.github.com/repos/svobodni/ballot_box/subscribers","subscription_url":"https://api.github.com/repos/svobodni/ballot_box/subscription","commits_url":"https://api.github.com/repos/svobodni/ballot_box/commits{/sha}","git_commits_url":"https://api.github.com/repos/svobodni/ballot_box/git/commits{/sha}","comments_url":"https://api.github.com/repos/svobodni/ballot_box/comments{/number}","issue_comment_url":"https://api.github.com/repos/svobodni/ballot_box/issues/comments{/number}","contents_url":"https://api.github.com/repos/svobodni/ballot_box/contents/{+path}","compare_url":"https://api.github.com/repos/svobodni/ballot_box/compare/{base}...{head}","merges_url":"https://api.github.com/repos/svobodni/ballot_box/merges","archive_url":"https://api.github.com/repos/svobodni/ballot_box/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/svobodni/ballot_box/downloads","issues_url":"https://api.github.com/repos/svobodni/ballot_box/issues{/number}","pulls_url":"https://api.github.com/repos/svobodni/ballot_box/pulls{/number}","milestones_url":"https://api.github.com/repos/svobodni/ballot_box/milestones{/number}","notifications_url":"https://api.github.com/repos/svobodni/ballot_box/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/svobodni/ballot_box/labels{/name}","releases_url":"https://api.github.com/repos/svobodni/ballot_box/releases{/id}","created_at":"2014-11-21T21:46:51Z","updated_at":"2015-04-07T15:45:09Z","pushed_at":"2016-01-02T21:09:01Z","git_url":"git://github.com/svobodni/ballot_box.git","ssh_url":"git@github.com:svobodni/ballot_box.git","clone_url":"https://github.com/svobodni/ballot_box.git","svn_url":"https://github.com/svobodni/ballot_box","homepage":"","size":97,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":16,"forks":1,"open_issues":16,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/svobodni/ballot_box/pulls/30"},"html":{"href":"https://github.com/svobodni/ballot_box/pull/30"},"issue":{"href":"https://api.github.com/repos/svobodni/ballot_box/issues/30"},"comments":{"href":"https://api.github.com/repos/svobodni/ballot_box/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/svobodni/ballot_box/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/svobodni/ballot_box/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/svobodni/ballot_box/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/svobodni/ballot_box/statuses/5c846488029dc6b058a7cd2ee6d5dfb2438eb294"}}}}