{"action":"created","comment":{"url":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/comments/32965426","id":32965426,"diff_hunk":"@@ -213,13 +213,12 @@ def deadline_management(self, request, tl, one, two, module, extra, prog):\n         context = {}\n \n         #   Set a flag on each perm for whether it has ended\n+        current_date = datetime.now()\n         for perm in perms:\n-            if perm.end_date is None or  perm.end_date > datetime.now():\n-                perm.open_now = True\n-            else:\n-                perm.open_now = False\n+            did_start = perm.start_date <= current_date","path":"esp/esp/program/modules/handlers/admincore.py","position":10,"original_position":10,"commit_id":"313ce0cf7a58aeddc497757a8a1e44ce83de4337","original_commit_id":"313ce0cf7a58aeddc497757a8a1e44ce83de4337","user":{"login":"benjaminjkraft","id":111238,"avatar_url":"https://avatars.githubusercontent.com/u/111238?v=3","gravatar_id":"","url":"https://api.github.com/users/benjaminjkraft","html_url":"https://github.com/benjaminjkraft","followers_url":"https://api.github.com/users/benjaminjkraft/followers","following_url":"https://api.github.com/users/benjaminjkraft/following{/other_user}","gists_url":"https://api.github.com/users/benjaminjkraft/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminjkraft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminjkraft/subscriptions","organizations_url":"https://api.github.com/users/benjaminjkraft/orgs","repos_url":"https://api.github.com/users/benjaminjkraft/repos","events_url":"https://api.github.com/users/benjaminjkraft/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminjkraft/received_events","type":"User","site_admin":false},"body":"This should also allow `None`, since that nominally means \"has always been open\", although I think it is used less.  But also, I think you can just use `perm.is_valid()` instead (it's inherited from `ExpirableModel`).","created_at":"2015-06-22T18:15:19Z","updated_at":"2015-06-22T18:15:19Z","html_url":"https://github.com/learning-unlimited/ESP-Website/pull/1712#discussion_r32965426","pull_request_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/1712","_links":{"self":{"href":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/comments/32965426"},"html":{"href":"https://github.com/learning-unlimited/ESP-Website/pull/1712#discussion_r32965426"},"pull_request":{"href":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/1712"}}},"pull_request":{"url":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/1712","id":38259227,"html_url":"https://github.com/learning-unlimited/ESP-Website/pull/1712","diff_url":"https://github.com/learning-unlimited/ESP-Website/pull/1712.diff","patch_url":"https://github.com/learning-unlimited/ESP-Website/pull/1712.patch","issue_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/1712","number":1712,"state":"open","locked":false,"title":"Ticket 1454","user":{"login":"joeleg","id":6207786,"avatar_url":"https://avatars.githubusercontent.com/u/6207786?v=3","gravatar_id":"","url":"https://api.github.com/users/joeleg","html_url":"https://github.com/joeleg","followers_url":"https://api.github.com/users/joeleg/followers","following_url":"https://api.github.com/users/joeleg/following{/other_user}","gists_url":"https://api.github.com/users/joeleg/gists{/gist_id}","starred_url":"https://api.github.com/users/joeleg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeleg/subscriptions","organizations_url":"https://api.github.com/users/joeleg/orgs","repos_url":"https://api.github.com/users/joeleg/repos","events_url":"https://api.github.com/users/joeleg/events{/privacy}","received_events_url":"https://api.github.com/users/joeleg/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-22T18:08:20Z","updated_at":"2015-06-22T18:15:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"974d4aae4828d01c113810be2d9ea10a3e583af3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/1712/commits","review_comments_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/1712/comments","review_comment_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/comments{/number}","comments_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/1712/comments","statuses_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/statuses/313ce0cf7a58aeddc497757a8a1e44ce83de4337","head":{"label":"learning-unlimited:ticket-1454","ref":"ticket-1454","sha":"313ce0cf7a58aeddc497757a8a1e44ce83de4337","user":{"login":"learning-unlimited","id":1150905,"avatar_url":"https://avatars.githubusercontent.com/u/1150905?v=3","gravatar_id":"","url":"https://api.github.com/users/learning-unlimited","html_url":"https://github.com/learning-unlimited","followers_url":"https://api.github.com/users/learning-unlimited/followers","following_url":"https://api.github.com/users/learning-unlimited/following{/other_user}","gists_url":"https://api.github.com/users/learning-unlimited/gists{/gist_id}","starred_url":"https://api.github.com/users/learning-unlimited/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learning-unlimited/subscriptions","organizations_url":"https://api.github.com/users/learning-unlimited/orgs","repos_url":"https://api.github.com/users/learning-unlimited/repos","events_url":"https://api.github.com/users/learning-unlimited/events{/privacy}","received_events_url":"https://api.github.com/users/learning-unlimited/received_events","type":"Organization","site_admin":false},"repo":{"id":2643878,"name":"ESP-Website","full_name":"learning-unlimited/ESP-Website","owner":{"login":"learning-unlimited","id":1150905,"avatar_url":"https://avatars.githubusercontent.com/u/1150905?v=3","gravatar_id":"","url":"https://api.github.com/users/learning-unlimited","html_url":"https://github.com/learning-unlimited","followers_url":"https://api.github.com/users/learning-unlimited/followers","following_url":"https://api.github.com/users/learning-unlimited/following{/other_user}","gists_url":"https://api.github.com/users/learning-unlimited/gists{/gist_id}","starred_url":"https://api.github.com/users/learning-unlimited/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learning-unlimited/subscriptions","organizations_url":"https://api.github.com/users/learning-unlimited/orgs","repos_url":"https://api.github.com/users/learning-unlimited/repos","events_url":"https://api.github.com/users/learning-unlimited/events{/privacy}","received_events_url":"https://api.github.com/users/learning-unlimited/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learning-unlimited/ESP-Website","description":"A website to help manage the logistics of large short-term educational programs","fork":false,"url":"https://api.github.com/repos/learning-unlimited/ESP-Website","forks_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/forks","keys_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/teams","hooks_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/hooks","issue_events_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/events{/number}","events_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/events","assignees_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/assignees{/user}","branches_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/branches{/branch}","tags_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/tags","blobs_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/refs{/sha}","trees_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/statuses/{sha}","languages_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/languages","stargazers_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/stargazers","contributors_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/contributors","subscribers_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/subscribers","subscription_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/subscription","commits_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/commits{/sha}","git_commits_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/commits{/sha}","comments_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/comments{/number}","issue_comment_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/comments{/number}","contents_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/contents/{+path}","compare_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/merges","archive_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/downloads","issues_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues{/number}","pulls_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls{/number}","milestones_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/milestones{/number}","notifications_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/labels{/name}","releases_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/releases{/id}","created_at":"2011-10-25T14:30:31Z","updated_at":"2015-05-18T01:44:06Z","pushed_at":"2015-06-22T18:08:21Z","git_url":"git://github.com/learning-unlimited/ESP-Website.git","ssh_url":"git@github.com:learning-unlimited/ESP-Website.git","clone_url":"https://github.com/learning-unlimited/ESP-Website.git","svn_url":"https://github.com/learning-unlimited/ESP-Website","homepage":"","size":58324,"stargazers_count":49,"watchers_count":49,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":623,"forks":35,"open_issues":623,"watchers":49,"default_branch":"main"}},"base":{"label":"learning-unlimited:main","ref":"main","sha":"61b467562a82dabb0e8247038995d67309e8e4a2","user":{"login":"learning-unlimited","id":1150905,"avatar_url":"https://avatars.githubusercontent.com/u/1150905?v=3","gravatar_id":"","url":"https://api.github.com/users/learning-unlimited","html_url":"https://github.com/learning-unlimited","followers_url":"https://api.github.com/users/learning-unlimited/followers","following_url":"https://api.github.com/users/learning-unlimited/following{/other_user}","gists_url":"https://api.github.com/users/learning-unlimited/gists{/gist_id}","starred_url":"https://api.github.com/users/learning-unlimited/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learning-unlimited/subscriptions","organizations_url":"https://api.github.com/users/learning-unlimited/orgs","repos_url":"https://api.github.com/users/learning-unlimited/repos","events_url":"https://api.github.com/users/learning-unlimited/events{/privacy}","received_events_url":"https://api.github.com/users/learning-unlimited/received_events","type":"Organization","site_admin":false},"repo":{"id":2643878,"name":"ESP-Website","full_name":"learning-unlimited/ESP-Website","owner":{"login":"learning-unlimited","id":1150905,"avatar_url":"https://avatars.githubusercontent.com/u/1150905?v=3","gravatar_id":"","url":"https://api.github.com/users/learning-unlimited","html_url":"https://github.com/learning-unlimited","followers_url":"https://api.github.com/users/learning-unlimited/followers","following_url":"https://api.github.com/users/learning-unlimited/following{/other_user}","gists_url":"https://api.github.com/users/learning-unlimited/gists{/gist_id}","starred_url":"https://api.github.com/users/learning-unlimited/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learning-unlimited/subscriptions","organizations_url":"https://api.github.com/users/learning-unlimited/orgs","repos_url":"https://api.github.com/users/learning-unlimited/repos","events_url":"https://api.github.com/users/learning-unlimited/events{/privacy}","received_events_url":"https://api.github.com/users/learning-unlimited/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learning-unlimited/ESP-Website","description":"A website to help manage the logistics of large short-term educational programs","fork":false,"url":"https://api.github.com/repos/learning-unlimited/ESP-Website","forks_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/forks","keys_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/teams","hooks_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/hooks","issue_events_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/events{/number}","events_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/events","assignees_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/assignees{/user}","branches_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/branches{/branch}","tags_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/tags","blobs_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/refs{/sha}","trees_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/statuses/{sha}","languages_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/languages","stargazers_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/stargazers","contributors_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/contributors","subscribers_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/subscribers","subscription_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/subscription","commits_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/commits{/sha}","git_commits_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/git/commits{/sha}","comments_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/comments{/number}","issue_comment_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/comments{/number}","contents_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/contents/{+path}","compare_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/merges","archive_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/downloads","issues_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues{/number}","pulls_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls{/number}","milestones_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/milestones{/number}","notifications_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/labels{/name}","releases_url":"https://api.github.com/repos/learning-unlimited/ESP-Website/releases{/id}","created_at":"2011-10-25T14:30:31Z","updated_at":"2015-05-18T01:44:06Z","pushed_at":"2015-06-22T18:08:21Z","git_url":"git://github.com/learning-unlimited/ESP-Website.git","ssh_url":"git@github.com:learning-unlimited/ESP-Website.git","clone_url":"https://github.com/learning-unlimited/ESP-Website.git","svn_url":"https://github.com/learning-unlimited/ESP-Website","homepage":"","size":58324,"stargazers_count":49,"watchers_count":49,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":623,"forks":35,"open_issues":623,"watchers":49,"default_branch":"main"}},"_links":{"self":{"href":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/1712"},"html":{"href":"https://github.com/learning-unlimited/ESP-Website/pull/1712"},"issue":{"href":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/1712"},"comments":{"href":"https://api.github.com/repos/learning-unlimited/ESP-Website/issues/1712/comments"},"review_comments":{"href":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/1712/comments"},"review_comment":{"href":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/learning-unlimited/ESP-Website/pulls/1712/commits"},"statuses":{"href":"https://api.github.com/repos/learning-unlimited/ESP-Website/statuses/313ce0cf7a58aeddc497757a8a1e44ce83de4337"}}}}