GitHub PullRequestReviewCommentEvent at 2014-11-29 16:03:44
Repository: freeseer
Actor: dideler
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Freeseer/freeseer/pulls/comments/21054710","id":21054710,"diff_hunk":"@@ -214,80 +208,145 @@ def get_presentation(self, talk_id):\n                              category=unicode(result.value(4).toString()),\r\n                              event=unicode(result.value(5).toString()),\r\n                              room=unicode(result.value(6).toString()),\r\n-                             date=unicode(result.value(7).toString()),\r\n-                             startTime=unicode(result.value(8).toString()),\r\n-                             endTime=unicode(result.value(9).toString()))\r\n+                             date=result.value(7),\r\n+                             startTime=result.value(8),\r\n+                             endTime=result.value(9))\r\n+        else:\r\n+            return None\r\n+\r\n+    def get_presentation_id(self, presentation):\r\n+        # FIXME: The query in this function has the same issue _helper_presentation_exists() has.\r","path":"src/freeseer/framework/database.py","position":null,"original_position":184,"commit_id":"e2c4d457934a711ec1aa638cb1e8f418e06a3e4f","original_commit_id":"79b2da36992a035b96d88d8c8aad831aa39d7a94","user":{"login":"dideler","id":497458,"avatar_url":"https://avatars.githubusercontent.com/u/497458?v=3","gravatar_id":"","url":"https://api.github.com/users/dideler","html_url":"https://github.com/dideler","followers_url":"https://api.github.com/users/dideler/followers","following_url":"https://api.github.com/users/dideler/following{/other_user}","gists_url":"https://api.github.com/users/dideler/gists{/gist_id}","starred_url":"https://api.github.com/users/dideler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dideler/subscriptions","organizations_url":"https://api.github.com/users/dideler/orgs","repos_url":"https://api.github.com/users/dideler/repos","events_url":"https://api.github.com/users/dideler/events{/privacy}","received_events_url":"https://api.github.com/users/dideler/received_events","type":"User","site_admin":false},"body":"Our INSERT query used to look like\r\n```sql\r\nINSERT INTO presentations\r\n```\r\nSince we don't specify the columns for the `presentations` table, it's expecting a value for every column (including the primary key Id column, but we would pass null and it auto-increments).\r\n\r\nIn this PR, it's changed to\r\n```sql\r\nINSERT INTO presentations(Title, Speaker, Description, Category, Event, Room, Date, StartTime, EndTime)\r\n```\r\nSo now we're explicitly saying which fields need values passed to them. We specify every field except `Id`.\r\n\r\nIf the field is specified, you either have to pass null or \"\" -- not providing either should result in a syntax error. The gist you posted is misleading. You printed a string, which is why you don't see the string values wrapped in double quotes, and why you don't see the empty string at all. So in this case empty strings are being inserted, not nulls.\r\n\r\nWhen you use the talk editor and you don't supply a value to a field, an empty string is inserted. The CSV importer also uses empty strings. The RSS importer might be the problem.\r\n\r\n```\r\nsrc/freeseer/tests/resources/sample_rss_data/summercamp2010.json\r\n21:            \"Room\" : null \r\n31:            \"Room\" : null\r\n51:            \"Room\" : null\r\n61:            \"Room\" : null\r\n69:            \"Time\" : null,\r\n...\r\n```\r\n\r\nWe should be strict about how we store the absence of a value. We either use null or empty string, but we shouldn't use both because that will cause problems.","created_at":"2014-11-29T16:03:44Z","updated_at":"2014-11-29T16:03:44Z","html_url":"https://github.com/Freeseer/freeseer/pull/671#discussion_r21054710","pull_request_url":"https://api.github.com/repos/Freeseer/freeseer/pulls/671","_links":{"self":{"href":"https://api.github.com/repos/Freeseer/freeseer/pulls/comments/21054710"},"html":{"href":"https://github.com/Freeseer/freeseer/pull/671#discussion_r21054710"},"pull_request":{"href":"https://api.github.com/repos/Freeseer/freeseer/pulls/671"}}},"pull_request":{"url":"https://api.github.com/repos/Freeseer/freeseer/pulls/671","id":25019233,"html_url":"https://github.com/Freeseer/freeseer/pull/671","diff_url":"https://github.com/Freeseer/freeseer/pull/671.diff","patch_url":"https://github.com/Freeseer/freeseer/pull/671.patch","issue_url":"https://api.github.com/repos/Freeseer/freeseer/issues/671","number":671,"state":"open","locked":false,"title":"unit test and refactor database.py part 2","user":{"login":"wigglier","id":8321642,"avatar_url":"https://avatars.githubusercontent.com/u/8321642?v=3","gravatar_id":"","url":"https://api.github.com/users/wigglier","html_url":"https://github.com/wigglier","followers_url":"https://api.github.com/users/wigglier/followers","following_url":"https://api.github.com/users/wigglier/following{/other_user}","gists_url":"https://api.github.com/users/wigglier/gists{/gist_id}","starred_url":"https://api.github.com/users/wigglier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wigglier/subscriptions","organizations_url":"https://api.github.com/users/wigglier/orgs","repos_url":"https://api.github.com/users/wigglier/repos","events_url":"https://api.github.com/users/wigglier/events{/privacy}","received_events_url":"https://api.github.com/users/wigglier/received_events","type":"User","site_admin":false},"body":"Add unit tests and refactor/fix/document issues related to the database.\r\n(Part 2, because #619 grew too large.)\r\n\r\nRelated #484\r\nRelated #619\r\n","created_at":"2014-11-25T16:12:08Z","updated_at":"2014-11-29T16:03:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54661ad9b1a7c9019f3354cd091e5803e7be3504","assignee":null,"milestone":{"url":"https://api.github.com/repos/Freeseer/freeseer/milestones/17","labels_url":"https://api.github.com/repos/Freeseer/freeseer/milestones/17/labels","id":563652,"number":17,"title":"2014 Fall - UCOSP","description":"UCOSP Projects for 2014 Fall term.","creator":{"login":"zxiiro","id":150177,"avatar_url":"https://avatars.githubusercontent.com/u/150177?v=3","gravatar_id":"","url":"https://api.github.com/users/zxiiro","html_url":"https://github.com/zxiiro","followers_url":"https://api.github.com/users/zxiiro/followers","following_url":"https://api.github.com/users/zxiiro/following{/other_user}","gists_url":"https://api.github.com/users/zxiiro/gists{/gist_id}","starred_url":"https://api.github.com/users/zxiiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zxiiro/subscriptions","organizations_url":"https://api.github.com/users/zxiiro/orgs","repos_url":"https://api.github.com/users/zxiiro/repos","events_url":"https://api.github.com/users/zxiiro/events{/privacy}","received_events_url":"https://api.github.com/users/zxiiro/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":49,"state":"open","created_at":"2014-02-09T17:41:03Z","updated_at":"2014-11-28T23:06:44Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Freeseer/freeseer/pulls/671/commits","review_comments_url":"https://api.github.com/repos/Freeseer/freeseer/pulls/671/comments","review_comment_url":"https://api.github.com/repos/Freeseer/freeseer/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Freeseer/freeseer/issues/671/comments","statuses_url":"https://api.github.com/repos/Freeseer/freeseer/statuses/e2c4d457934a711ec1aa638cb1e8f418e06a3e4f","head":{"label":"wigglier:484-unit-test-and-refactor-p2","ref":"484-unit-test-and-refactor-p2","sha":"e2c4d457934a711ec1aa638cb1e8f418e06a3e4f","user":{"login":"wigglier","id":8321642,"avatar_url":"https://avatars.githubusercontent.com/u/8321642?v=3","gravatar_id":"","url":"https://api.github.com/users/wigglier","html_url":"https://github.com/wigglier","followers_url":"https://api.github.com/users/wigglier/followers","following_url":"https://api.github.com/users/wigglier/following{/other_user}","gists_url":"https://api.github.com/users/wigglier/gists{/gist_id}","starred_url":"https://api.github.com/users/wigglier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wigglier/subscriptions","organizations_url":"https://api.github.com/users/wigglier/orgs","repos_url":"https://api.github.com/users/wigglier/repos","events_url":"https://api.github.com/users/wigglier/events{/privacy}","received_events_url":"https://api.github.com/users/wigglier/received_events","type":"User","site_admin":false},"repo":{"id":23132318,"name":"freeseer","full_name":"wigglier/freeseer","owner":{"login":"wigglier","id":8321642,"avatar_url":"https://avatars.githubusercontent.com/u/8321642?v=3","gravatar_id":"","url":"https://api.github.com/users/wigglier","html_url":"https://github.com/wigglier","followers_url":"https://api.github.com/users/wigglier/followers","following_url":"https://api.github.com/users/wigglier/following{/other_user}","gists_url":"https://api.github.com/users/wigglier/gists{/gist_id}","starred_url":"https://api.github.com/users/wigglier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wigglier/subscriptions","organizations_url":"https://api.github.com/users/wigglier/orgs","repos_url":"https://api.github.com/users/wigglier/repos","events_url":"https://api.github.com/users/wigglier/events{/privacy}","received_events_url":"https://api.github.com/users/wigglier/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wigglier/freeseer","description":"A set of tools designed for capturing presentations. The main tool is capable of capturing VGA output and audio, and mixing them together to produce a video.","fork":true,"url":"https://api.github.com/repos/wigglier/freeseer","forks_url":"https://api.github.com/repos/wigglier/freeseer/forks","keys_url":"https://api.github.com/repos/wigglier/freeseer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wigglier/freeseer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wigglier/freeseer/teams","hooks_url":"https://api.github.com/repos/wigglier/freeseer/hooks","issue_events_url":"https://api.github.com/repos/wigglier/freeseer/issues/events{/number}","events_url":"https://api.github.com/repos/wigglier/freeseer/events","assignees_url":"https://api.github.com/repos/wigglier/freeseer/assignees{/user}","branches_url":"https://api.github.com/repos/wigglier/freeseer/branches{/branch}","tags_url":"https://api.github.com/repos/wigglier/freeseer/tags","blobs_url":"https://api.github.com/repos/wigglier/freeseer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wigglier/freeseer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wigglier/freeseer/git/refs{/sha}","trees_url":"https://api.github.com/repos/wigglier/freeseer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wigglier/freeseer/statuses/{sha}","languages_url":"https://api.github.com/repos/wigglier/freeseer/languages","stargazers_url":"https://api.github.com/repos/wigglier/freeseer/stargazers","contributors_url":"https://api.github.com/repos/wigglier/freeseer/contributors","subscribers_url":"https://api.github.com/repos/wigglier/freeseer/subscribers","subscription_url":"https://api.github.com/repos/wigglier/freeseer/subscription","commits_url":"https://api.github.com/repos/wigglier/freeseer/commits{/sha}","git_commits_url":"https://api.github.com/repos/wigglier/freeseer/git/commits{/sha}","comments_url":"https://api.github.com/repos/wigglier/freeseer/comments{/number}","issue_comment_url":"https://api.github.com/repos/wigglier/freeseer/issues/comments/{number}","contents_url":"https://api.github.com/repos/wigglier/freeseer/contents/{+path}","compare_url":"https://api.github.com/repos/wigglier/freeseer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wigglier/freeseer/merges","archive_url":"https://api.github.com/repos/wigglier/freeseer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wigglier/freeseer/downloads","issues_url":"https://api.github.com/repos/wigglier/freeseer/issues{/number}","pulls_url":"https://api.github.com/repos/wigglier/freeseer/pulls{/number}","milestones_url":"https://api.github.com/repos/wigglier/freeseer/milestones{/number}","notifications_url":"https://api.github.com/repos/wigglier/freeseer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wigglier/freeseer/labels{/name}","releases_url":"https://api.github.com/repos/wigglier/freeseer/releases{/id}","created_at":"2014-08-20T01:54:43Z","updated_at":"2014-11-21T22:34:17Z","pushed_at":"2014-11-29T03:16:35Z","git_url":"git://github.com/wigglier/freeseer.git","ssh_url":"git@github.com:wigglier/freeseer.git","clone_url":"https://github.com/wigglier/freeseer.git","svn_url":"https://github.com/wigglier/freeseer","homepage":"http://freeseer.github.io","size":118810,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"Freeseer:master","ref":"master","sha":"2a74681b45186244f1a6bc3df730346b9e4f05a5","user":{"login":"Freeseer","id":469374,"avatar_url":"https://avatars.githubusercontent.com/u/469374?v=3","gravatar_id":"","url":"https://api.github.com/users/Freeseer","html_url":"https://github.com/Freeseer","followers_url":"https://api.github.com/users/Freeseer/followers","following_url":"https://api.github.com/users/Freeseer/following{/other_user}","gists_url":"https://api.github.com/users/Freeseer/gists{/gist_id}","starred_url":"https://api.github.com/users/Freeseer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Freeseer/subscriptions","organizations_url":"https://api.github.com/users/Freeseer/orgs","repos_url":"https://api.github.com/users/Freeseer/repos","events_url":"https://api.github.com/users/Freeseer/events{/privacy}","received_events_url":"https://api.github.com/users/Freeseer/received_events","type":"Organization","site_admin":false},"repo":{"id":391515,"name":"freeseer","full_name":"Freeseer/freeseer","owner":{"login":"Freeseer","id":469374,"avatar_url":"https://avatars.githubusercontent.com/u/469374?v=3","gravatar_id":"","url":"https://api.github.com/users/Freeseer","html_url":"https://github.com/Freeseer","followers_url":"https://api.github.com/users/Freeseer/followers","following_url":"https://api.github.com/users/Freeseer/following{/other_user}","gists_url":"https://api.github.com/users/Freeseer/gists{/gist_id}","starred_url":"https://api.github.com/users/Freeseer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Freeseer/subscriptions","organizations_url":"https://api.github.com/users/Freeseer/orgs","repos_url":"https://api.github.com/users/Freeseer/repos","events_url":"https://api.github.com/users/Freeseer/events{/privacy}","received_events_url":"https://api.github.com/users/Freeseer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Freeseer/freeseer","description":"Designed for capturing presentations at conferences. Pre-fill a list of talks to record, record them, and upload them to YouTube with our YouTube Uploader.","fork":false,"url":"https://api.github.com/repos/Freeseer/freeseer","forks_url":"https://api.github.com/repos/Freeseer/freeseer/forks","keys_url":"https://api.github.com/repos/Freeseer/freeseer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Freeseer/freeseer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Freeseer/freeseer/teams","hooks_url":"https://api.github.com/repos/Freeseer/freeseer/hooks","issue_events_url":"https://api.github.com/repos/Freeseer/freeseer/issues/events{/number}","events_url":"https://api.github.com/repos/Freeseer/freeseer/events","assignees_url":"https://api.github.com/repos/Freeseer/freeseer/assignees{/user}","branches_url":"https://api.github.com/repos/Freeseer/freeseer/branches{/branch}","tags_url":"https://api.github.com/repos/Freeseer/freeseer/tags","blobs_url":"https://api.github.com/repos/Freeseer/freeseer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Freeseer/freeseer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Freeseer/freeseer/git/refs{/sha}","trees_url":"https://api.github.com/repos/Freeseer/freeseer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Freeseer/freeseer/statuses/{sha}","languages_url":"https://api.github.com/repos/Freeseer/freeseer/languages","stargazers_url":"https://api.github.com/repos/Freeseer/freeseer/stargazers","contributors_url":"https://api.github.com/repos/Freeseer/freeseer/contributors","subscribers_url":"https://api.github.com/repos/Freeseer/freeseer/subscribers","subscription_url":"https://api.github.com/repos/Freeseer/freeseer/subscription","commits_url":"https://api.github.com/repos/Freeseer/freeseer/commits{/sha}","git_commits_url":"https://api.github.com/repos/Freeseer/freeseer/git/commits{/sha}","comments_url":"https://api.github.com/repos/Freeseer/freeseer/comments{/number}","issue_comment_url":"https://api.github.com/repos/Freeseer/freeseer/issues/comments/{number}","contents_url":"https://api.github.com/repos/Freeseer/freeseer/contents/{+path}","compare_url":"https://api.github.com/repos/Freeseer/freeseer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Freeseer/freeseer/merges","archive_url":"https://api.github.com/repos/Freeseer/freeseer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Freeseer/freeseer/downloads","issues_url":"https://api.github.com/repos/Freeseer/freeseer/issues{/number}","pulls_url":"https://api.github.com/repos/Freeseer/freeseer/pulls{/number}","milestones_url":"https://api.github.com/repos/Freeseer/freeseer/milestones{/number}","notifications_url":"https://api.github.com/repos/Freeseer/freeseer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Freeseer/freeseer/labels{/name}","releases_url":"https://api.github.com/repos/Freeseer/freeseer/releases{/id}","created_at":"2009-12-01T14:17:15Z","updated_at":"2014-11-28T23:06:44Z","pushed_at":"2014-11-28T23:06:44Z","git_url":"git://github.com/Freeseer/freeseer.git","ssh_url":"git@github.com:Freeseer/freeseer.git","clone_url":"https://github.com/Freeseer/freeseer.git","svn_url":"https://github.com/Freeseer/freeseer","homepage":"http://freeseer.readthedocs.org","size":128806,"stargazers_count":174,"watchers_count":174,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":96,"mirror_url":null,"open_issues_count":136,"forks":96,"open_issues":136,"watchers":174,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Freeseer/freeseer/pulls/671"},"html":{"href":"https://github.com/Freeseer/freeseer/pull/671"},"issue":{"href":"https://api.github.com/repos/Freeseer/freeseer/issues/671"},"comments":{"href":"https://api.github.com/repos/Freeseer/freeseer/issues/671/comments"},"review_comments":{"href":"https://api.github.com/repos/Freeseer/freeseer/pulls/671/comments"},"review_comment":{"href":"https://api.github.com/repos/Freeseer/freeseer/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Freeseer/freeseer/pulls/671/commits"},"statuses":{"href":"https://api.github.com/repos/Freeseer/freeseer/statuses/e2c4d457934a711ec1aa638cb1e8f418e06a3e4f"}}}}