{"action":"created","comment":{"url":"https://api.github.com/repos/andgein/SIStema/pulls/comments/189463287","pull_request_review_id":121647899,"id":189463287,"diff_hunk":"@@ -118,24 +110,42 @@ def render_school_and_class(self, value):\n     def render_session(self, value):\n         # TODO: will it be filtered?\n         status = value.all()[0]\n-        return status.session.name if status.session else ''\n+        sessions_and_parallels = status.sessions_and_parallels.all()\n+        selected_session = sessions_and_parallels.filter(selected_by_user=True).first()\n+        if selected_session is not None:\n+            return selected_session.session.name if selected_session.session else ''\n+        return ', '.join(\n+            sessions_and_parallels\n+                .filter(session__isnull=False)\n+                .order_by('session_id')\n+                .values_list('session__name', flat=True)\n+        )\n \n     def render_parallel(self, value):\n         # TODO: will it be filtered?\n         status = value.all()[0]\n-        return status.parallel.name if status.parallel else ''\n+        sessions_and_parallels = status.sessions_and_parallels.all()\n+        selected_parallel = sessions_and_parallels.filter(selected_by_user=True).first()\n+        if selected_parallel is not None:\n+            return selected_parallel.parallel.name if selected_parallel.parallel else ''\n+        return ', '.join(\n+            sessions_and_parallels\n+                .filter(parallel__isnull=False)\n+                .order_by('parallel_id')\n+                .values_list('parallel__name', flat=True)\n+        )\n \n     def render_enrolled_status(self, record):\n         absence_reasons = record.absence_reasons.all()\n         absence_reason = absence_reasons[0] if absence_reasons else None\n-        if absence_reason is None:\n-            # TODO: check for participation confirmation. Another invisible\n-            #       step?\n-            if record.questionnaire_answers.all():\n-                return ''\n-            else:\n-                return 'Участие не подтверждено'\n-        return str(absence_reason)\n+        if absence_reason is not None:\n+            return str(absence_reason)\n+\n+        entrance_status = record.entrance_statuses.all()[0]","path":"src/web/modules/entrance/views.py","position":107,"original_position":107,"commit_id":"d2bf1f9b30fbb341ae46bb5a284d92027d696825","original_commit_id":"d2bf1f9b30fbb341ae46bb5a284d92027d696825","user":{"login":"andgein","id":1853477,"avatar_url":"https://avatars0.githubusercontent.com/u/1853477?v=4","gravatar_id":"","url":"https://api.github.com/users/andgein","html_url":"https://github.com/andgein","followers_url":"https://api.github.com/users/andgein/followers","following_url":"https://api.github.com/users/andgein/following{/other_user}","gists_url":"https://api.github.com/users/andgein/gists{/gist_id}","starred_url":"https://api.github.com/users/andgein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andgein/subscriptions","organizations_url":"https://api.github.com/users/andgein/orgs","repos_url":"https://api.github.com/users/andgein/repos","events_url":"https://api.github.com/users/andgein/events{/privacy}","received_events_url":"https://api.github.com/users/andgein/received_events","type":"User","site_admin":false},"body":"Тут я сделал так, потому что так было у тебя в `render_parallel`. Щас попробую с `get`","created_at":"2018-05-20T16:06:51Z","updated_at":"2018-05-20T16:06:51Z","html_url":"https://github.com/andgein/SIStema/pull/463#discussion_r189463287","pull_request_url":"https://api.github.com/repos/andgein/SIStema/pulls/463","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/andgein/SIStema/pulls/comments/189463287"},"html":{"href":"https://github.com/andgein/SIStema/pull/463#discussion_r189463287"},"pull_request":{"href":"https://api.github.com/repos/andgein/SIStema/pulls/463"}},"in_reply_to_id":189462646},"pull_request":{"url":"https://api.github.com/repos/andgein/SIStema/pulls/463","id":189208854,"html_url":"https://github.com/andgein/SIStema/pull/463","diff_url":"https://github.com/andgein/SIStema/pull/463.diff","patch_url":"https://github.com/andgein/SIStema/pull/463.patch","issue_url":"https://api.github.com/repos/andgein/SIStema/issues/463","number":463,"state":"open","locked":false,"title":"Enrolling to many parallels","user":{"login":"andgein","id":1853477,"avatar_url":"https://avatars0.githubusercontent.com/u/1853477?v=4","gravatar_id":"","url":"https://api.github.com/users/andgein","html_url":"https://github.com/andgein","followers_url":"https://api.github.com/users/andgein/followers","following_url":"https://api.github.com/users/andgein/following{/other_user}","gists_url":"https://api.github.com/users/andgein/gists{/gist_id}","starred_url":"https://api.github.com/users/andgein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andgein/subscriptions","organizations_url":"https://api.github.com/users/andgein/orgs","repos_url":"https://api.github.com/users/andgein/repos","events_url":"https://api.github.com/users/andgein/events{/privacy}","received_events_url":"https://api.github.com/users/andgein/received_events","type":"User","site_admin":false},"body":"## Когда приняли в одну параллель\r\n\r\n![2018-05-20_02-30-51](https://user-images.githubusercontent.com/1853477/40273513-950672b8-5bda-11e8-8392-adc648d4fb90.png)\r\n\r\nПосле подтверждения:\r\n![2018-05-20_02-30-59](https://user-images.githubusercontent.com/1853477/40273514-9527646e-5bda-11e8-9c9f-a680f66b8fcb.png)\r\n\r\n## Когда приняли в несколько параллелей\r\n![2018-05-20_02-34-25](https://user-images.githubusercontent.com/1853477/40273515-954afbd6-5bda-11e8-9bb6-e374a4635309.png)\r\nПосле подтверждения:\r\n![2018-05-20_02-46-11](https://user-images.githubusercontent.com/1853477/40273518-95ad0038-5bda-11e8-9ba9-d4f3f36d276e.png)\r\n\r\n## Попап отказа от участия\r\n![2018-05-20_02-34-36](https://user-images.githubusercontent.com/1853477/40273516-9569de5c-5bda-11e8-8ef3-0700d87cfad3.png)\r\n\r\nКроме того, появились группы «подтвердивших участие» и «неподтвердивших участие»\r\n\r\n","created_at":"2018-05-19T22:06:57Z","updated_at":"2018-05-20T16:06:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d34dd57dd57874a66058614fcb114905fb65d89c","assignee":{"login":"andgein","id":1853477,"avatar_url":"https://avatars0.githubusercontent.com/u/1853477?v=4","gravatar_id":"","url":"https://api.github.com/users/andgein","html_url":"https://github.com/andgein","followers_url":"https://api.github.com/users/andgein/followers","following_url":"https://api.github.com/users/andgein/following{/other_user}","gists_url":"https://api.github.com/users/andgein/gists{/gist_id}","starred_url":"https://api.github.com/users/andgein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andgein/subscriptions","organizations_url":"https://api.github.com/users/andgein/orgs","repos_url":"https://api.github.com/users/andgein/repos","events_url":"https://api.github.com/users/andgein/events{/privacy}","received_events_url":"https://api.github.com/users/andgein/received_events","type":"User","site_admin":false},"assignees":[{"login":"andgein","id":1853477,"avatar_url":"https://avatars0.githubusercontent.com/u/1853477?v=4","gravatar_id":"","url":"https://api.github.com/users/andgein","html_url":"https://github.com/andgein","followers_url":"https://api.github.com/users/andgein/followers","following_url":"https://api.github.com/users/andgein/following{/other_user}","gists_url":"https://api.github.com/users/andgein/gists{/gist_id}","starred_url":"https://api.github.com/users/andgein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andgein/subscriptions","organizations_url":"https://api.github.com/users/andgein/orgs","repos_url":"https://api.github.com/users/andgein/repos","events_url":"https://api.github.com/users/andgein/events{/privacy}","received_events_url":"https://api.github.com/users/andgein/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":856816578,"url":"https://api.github.com/repos/andgein/SIStema/labels/module:entrance","name":"module:entrance","color":"cf7cdd","default":false},{"id":350607388,"url":"https://api.github.com/repos/andgein/SIStema/labels/priority:1:high","name":"priority:1:high","color":"FFA726","default":false},{"id":848752371,"url":"https://api.github.com/repos/andgein/SIStema/labels/review:medium","name":"review:medium","color":"3a2ca0","default":false},{"id":235346117,"url":"https://api.github.com/repos/andgein/SIStema/labels/type:feature","name":"type:feature","color":"D1C4E9","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/andgein/SIStema/pulls/463/commits","review_comments_url":"https://api.github.com/repos/andgein/SIStema/pulls/463/comments","review_comment_url":"https://api.github.com/repos/andgein/SIStema/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andgein/SIStema/issues/463/comments","statuses_url":"https://api.github.com/repos/andgein/SIStema/statuses/d2bf1f9b30fbb341ae46bb5a284d92027d696825","head":{"label":"andgein:enrolled-to-many-parallels","ref":"enrolled-to-many-parallels","sha":"d2bf1f9b30fbb341ae46bb5a284d92027d696825","user":{"login":"andgein","id":1853477,"avatar_url":"https://avatars0.githubusercontent.com/u/1853477?v=4","gravatar_id":"","url":"https://api.github.com/users/andgein","html_url":"https://github.com/andgein","followers_url":"https://api.github.com/users/andgein/followers","following_url":"https://api.github.com/users/andgein/following{/other_user}","gists_url":"https://api.github.com/users/andgein/gists{/gist_id}","starred_url":"https://api.github.com/users/andgein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andgein/subscriptions","organizations_url":"https://api.github.com/users/andgein/orgs","repos_url":"https://api.github.com/users/andgein/repos","events_url":"https://api.github.com/users/andgein/events{/privacy}","received_events_url":"https://api.github.com/users/andgein/received_events","type":"User","site_admin":false},"repo":{"id":38964306,"name":"SIStema","full_name":"andgein/SIStema","owner":{"login":"andgein","id":1853477,"avatar_url":"https://avatars0.githubusercontent.com/u/1853477?v=4","gravatar_id":"","url":"https://api.github.com/users/andgein","html_url":"https://github.com/andgein","followers_url":"https://api.github.com/users/andgein/followers","following_url":"https://api.github.com/users/andgein/following{/other_user}","gists_url":"https://api.github.com/users/andgein/gists{/gist_id}","starred_url":"https://api.github.com/users/andgein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andgein/subscriptions","organizations_url":"https://api.github.com/users/andgein/orgs","repos_url":"https://api.github.com/users/andgein/repos","events_url":"https://api.github.com/users/andgein/events{/privacy}","received_events_url":"https://api.github.com/users/andgein/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andgein/SIStema","description":"Web service for easy Summer Informatic School creating","fork":false,"url":"https://api.github.com/repos/andgein/SIStema","forks_url":"https://api.github.com/repos/andgein/SIStema/forks","keys_url":"https://api.github.com/repos/andgein/SIStema/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andgein/SIStema/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andgein/SIStema/teams","hooks_url":"https://api.github.com/repos/andgein/SIStema/hooks","issue_events_url":"https://api.github.com/repos/andgein/SIStema/issues/events{/number}","events_url":"https://api.github.com/repos/andgein/SIStema/events","assignees_url":"https://api.github.com/repos/andgein/SIStema/assignees{/user}","branches_url":"https://api.github.com/repos/andgein/SIStema/branches{/branch}","tags_url":"https://api.github.com/repos/andgein/SIStema/tags","blobs_url":"https://api.github.com/repos/andgein/SIStema/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andgein/SIStema/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andgein/SIStema/git/refs{/sha}","trees_url":"https://api.github.com/repos/andgein/SIStema/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andgein/SIStema/statuses/{sha}","languages_url":"https://api.github.com/repos/andgein/SIStema/languages","stargazers_url":"https://api.github.com/repos/andgein/SIStema/stargazers","contributors_url":"https://api.github.com/repos/andgein/SIStema/contributors","subscribers_url":"https://api.github.com/repos/andgein/SIStema/subscribers","subscription_url":"https://api.github.com/repos/andgein/SIStema/subscription","commits_url":"https://api.github.com/repos/andgein/SIStema/commits{/sha}","git_commits_url":"https://api.github.com/repos/andgein/SIStema/git/commits{/sha}","comments_url":"https://api.github.com/repos/andgein/SIStema/comments{/number}","issue_comment_url":"https://api.github.com/repos/andgein/SIStema/issues/comments{/number}","contents_url":"https://api.github.com/repos/andgein/SIStema/contents/{+path}","compare_url":"https://api.github.com/repos/andgein/SIStema/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andgein/SIStema/merges","archive_url":"https://api.github.com/repos/andgein/SIStema/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andgein/SIStema/downloads","issues_url":"https://api.github.com/repos/andgein/SIStema/issues{/number}","pulls_url":"https://api.github.com/repos/andgein/SIStema/pulls{/number}","milestones_url":"https://api.github.com/repos/andgein/SIStema/milestones{/number}","notifications_url":"https://api.github.com/repos/andgein/SIStema/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andgein/SIStema/labels{/name}","releases_url":"https://api.github.com/repos/andgein/SIStema/releases{/id}","deployments_url":"https://api.github.com/repos/andgein/SIStema/deployments","created_at":"2015-07-12T14:16:38Z","updated_at":"2018-05-20T13:57:12Z","pushed_at":"2018-05-20T13:57:09Z","git_url":"git://github.com/andgein/SIStema.git","ssh_url":"git@github.com:andgein/SIStema.git","clone_url":"https://github.com/andgein/SIStema.git","svn_url":"https://github.com/andgein/SIStema","homepage":"https://sistema.lksh.ru","size":50758,"stargazers_count":5,"watchers_count":5,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":138,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":138,"watchers":5,"default_branch":"master"}},"base":{"label":"andgein:master","ref":"master","sha":"e03cf0edc7c356cbdc41f69f423d9ff7580a4d8c","user":{"login":"andgein","id":1853477,"avatar_url":"https://avatars0.githubusercontent.com/u/1853477?v=4","gravatar_id":"","url":"https://api.github.com/users/andgein","html_url":"https://github.com/andgein","followers_url":"https://api.github.com/users/andgein/followers","following_url":"https://api.github.com/users/andgein/following{/other_user}","gists_url":"https://api.github.com/users/andgein/gists{/gist_id}","starred_url":"https://api.github.com/users/andgein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andgein/subscriptions","organizations_url":"https://api.github.com/users/andgein/orgs","repos_url":"https://api.github.com/users/andgein/repos","events_url":"https://api.github.com/users/andgein/events{/privacy}","received_events_url":"https://api.github.com/users/andgein/received_events","type":"User","site_admin":false},"repo":{"id":38964306,"name":"SIStema","full_name":"andgein/SIStema","owner":{"login":"andgein","id":1853477,"avatar_url":"https://avatars0.githubusercontent.com/u/1853477?v=4","gravatar_id":"","url":"https://api.github.com/users/andgein","html_url":"https://github.com/andgein","followers_url":"https://api.github.com/users/andgein/followers","following_url":"https://api.github.com/users/andgein/following{/other_user}","gists_url":"https://api.github.com/users/andgein/gists{/gist_id}","starred_url":"https://api.github.com/users/andgein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andgein/subscriptions","organizations_url":"https://api.github.com/users/andgein/orgs","repos_url":"https://api.github.com/users/andgein/repos","events_url":"https://api.github.com/users/andgein/events{/privacy}","received_events_url":"https://api.github.com/users/andgein/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andgein/SIStema","description":"Web service for easy Summer Informatic School creating","fork":false,"url":"https://api.github.com/repos/andgein/SIStema","forks_url":"https://api.github.com/repos/andgein/SIStema/forks","keys_url":"https://api.github.com/repos/andgein/SIStema/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andgein/SIStema/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andgein/SIStema/teams","hooks_url":"https://api.github.com/repos/andgein/SIStema/hooks","issue_events_url":"https://api.github.com/repos/andgein/SIStema/issues/events{/number}","events_url":"https://api.github.com/repos/andgein/SIStema/events","assignees_url":"https://api.github.com/repos/andgein/SIStema/assignees{/user}","branches_url":"https://api.github.com/repos/andgein/SIStema/branches{/branch}","tags_url":"https://api.github.com/repos/andgein/SIStema/tags","blobs_url":"https://api.github.com/repos/andgein/SIStema/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andgein/SIStema/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andgein/SIStema/git/refs{/sha}","trees_url":"https://api.github.com/repos/andgein/SIStema/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andgein/SIStema/statuses/{sha}","languages_url":"https://api.github.com/repos/andgein/SIStema/languages","stargazers_url":"https://api.github.com/repos/andgein/SIStema/stargazers","contributors_url":"https://api.github.com/repos/andgein/SIStema/contributors","subscribers_url":"https://api.github.com/repos/andgein/SIStema/subscribers","subscription_url":"https://api.github.com/repos/andgein/SIStema/subscription","commits_url":"https://api.github.com/repos/andgein/SIStema/commits{/sha}","git_commits_url":"https://api.github.com/repos/andgein/SIStema/git/commits{/sha}","comments_url":"https://api.github.com/repos/andgein/SIStema/comments{/number}","issue_comment_url":"https://api.github.com/repos/andgein/SIStema/issues/comments{/number}","contents_url":"https://api.github.com/repos/andgein/SIStema/contents/{+path}","compare_url":"https://api.github.com/repos/andgein/SIStema/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andgein/SIStema/merges","archive_url":"https://api.github.com/repos/andgein/SIStema/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andgein/SIStema/downloads","issues_url":"https://api.github.com/repos/andgein/SIStema/issues{/number}","pulls_url":"https://api.github.com/repos/andgein/SIStema/pulls{/number}","milestones_url":"https://api.github.com/repos/andgein/SIStema/milestones{/number}","notifications_url":"https://api.github.com/repos/andgein/SIStema/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andgein/SIStema/labels{/name}","releases_url":"https://api.github.com/repos/andgein/SIStema/releases{/id}","deployments_url":"https://api.github.com/repos/andgein/SIStema/deployments","created_at":"2015-07-12T14:16:38Z","updated_at":"2018-05-20T13:57:12Z","pushed_at":"2018-05-20T13:57:09Z","git_url":"git://github.com/andgein/SIStema.git","ssh_url":"git@github.com:andgein/SIStema.git","clone_url":"https://github.com/andgein/SIStema.git","svn_url":"https://github.com/andgein/SIStema","homepage":"https://sistema.lksh.ru","size":50758,"stargazers_count":5,"watchers_count":5,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":138,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":138,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andgein/SIStema/pulls/463"},"html":{"href":"https://github.com/andgein/SIStema/pull/463"},"issue":{"href":"https://api.github.com/repos/andgein/SIStema/issues/463"},"comments":{"href":"https://api.github.com/repos/andgein/SIStema/issues/463/comments"},"review_comments":{"href":"https://api.github.com/repos/andgein/SIStema/pulls/463/comments"},"review_comment":{"href":"https://api.github.com/repos/andgein/SIStema/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andgein/SIStema/pulls/463/commits"},"statuses":{"href":"https://api.github.com/repos/andgein/SIStema/statuses/d2bf1f9b30fbb341ae46bb5a284d92027d696825"}},"author_association":"OWNER"}}
{"actor":{"display_login":"andgein"}}