{"action":"created","comment":{"url":"https://api.github.com/repos/artefactual/archivematica/pulls/comments/22983173","id":22983173,"diff_hunk":"@@ -45,40 +45,39 @@ def __init__(self, jobChainLink, pk, unit):\n         self.tasksLock = threading.Lock()\n         self.exitCode = 0\n         self.clearToNextLink = False\n-        sql = \"\"\"SELECT * FROM StandardTasksConfigs where pk = '%s'\"\"\" % (pk.__str__())\n-        c, sqlLock = databaseInterface.querySQL(sql)\n-        row = c.fetchone()\n-        while row != None:\n-            filterFileEnd = deUnicode(row[1])\n-            filterFileStart = deUnicode(row[2])\n-            filterSubDir = deUnicode(row[3])\n-            requiresOutputLock = row[4]\n-            self.standardOutputFile = deUnicode(row[5])\n-            self.standardErrorFile = deUnicode(row[6])\n-            self.execute = deUnicode(row[7])\n-            self.arguments = deUnicode(row[8])\n-            row = c.fetchone()\n-        sqlLock.release()\n-        if requiresOutputLock:\n+\n+        stc = StandardTaskConfig.objects.get(id=str(pk))\n+        # These three may be concatenated/compared with other strings,\n+        # so they need to be bytestrings here\n+        filterFileEnd = str(stc.filter_file_end) if stc.filter_file_end else ''\n+        filterFileStart = str(stc.filter_file_start) if stc.filter_file_start else ''\n+        filterSubDir = str(stc.filter_subdir) if stc.filter_subdir else ''","path":"src/MCPServer/lib/linkTaskManagerFiles.py","position":39,"original_position":39,"commit_id":"fda82ffefa80ab9310b78f3a4b80f3ca2063ab9f","original_commit_id":"fda82ffefa80ab9310b78f3a4b80f3ca2063ab9f","user":{"login":"Hwesta","id":3166226,"avatar_url":"https://avatars.githubusercontent.com/u/3166226?v=3","gravatar_id":"","url":"https://api.github.com/users/Hwesta","html_url":"https://github.com/Hwesta","followers_url":"https://api.github.com/users/Hwesta/followers","following_url":"https://api.github.com/users/Hwesta/following{/other_user}","gists_url":"https://api.github.com/users/Hwesta/gists{/gist_id}","starred_url":"https://api.github.com/users/Hwesta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hwesta/subscriptions","organizations_url":"https://api.github.com/users/Hwesta/orgs","repos_url":"https://api.github.com/users/Hwesta/repos","events_url":"https://api.github.com/users/Hwesta/events{/privacy}","received_events_url":"https://api.github.com/users/Hwesta/received_events","type":"User","site_admin":false},"body":"Should filterFoo get the same treatment in linkTaskManagerDirectories.py, above?","created_at":"2015-01-15T00:38:53Z","updated_at":"2015-01-15T00:38:53Z","html_url":"https://github.com/artefactual/archivematica/pull/98#discussion_r22983173","pull_request_url":"https://api.github.com/repos/artefactual/archivematica/pulls/98","_links":{"self":{"href":"https://api.github.com/repos/artefactual/archivematica/pulls/comments/22983173"},"html":{"href":"https://github.com/artefactual/archivematica/pull/98#discussion_r22983173"},"pull_request":{"href":"https://api.github.com/repos/artefactual/archivematica/pulls/98"}}},"pull_request":{"url":"https://api.github.com/repos/artefactual/archivematica/pulls/98","id":20081364,"html_url":"https://github.com/artefactual/archivematica/pull/98","diff_url":"https://github.com/artefactual/archivematica/pull/98.diff","patch_url":"https://github.com/artefactual/archivematica/pull/98.patch","issue_url":"https://api.github.com/repos/artefactual/archivematica/issues/98","number":98,"state":"open","locked":false,"title":"Replace databaseInterface with Django models","user":{"login":"mistydemeo","id":780485,"avatar_url":"https://avatars.githubusercontent.com/u/780485?v=3","gravatar_id":"","url":"https://api.github.com/users/mistydemeo","html_url":"https://github.com/mistydemeo","followers_url":"https://api.github.com/users/mistydemeo/followers","following_url":"https://api.github.com/users/mistydemeo/following{/other_user}","gists_url":"https://api.github.com/users/mistydemeo/gists{/gist_id}","starred_url":"https://api.github.com/users/mistydemeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mistydemeo/subscriptions","organizations_url":"https://api.github.com/users/mistydemeo/orgs","repos_url":"https://api.github.com/users/mistydemeo/repos","events_url":"https://api.github.com/users/mistydemeo/events{/privacy}","received_events_url":"https://api.github.com/users/mistydemeo/received_events","type":"User","site_admin":false},"body":"~~`databaseInterface` is still imported in a few places in MCPServer, primarily for the `getUTCTime` function that will be moved elsewhere, and for database locking that may be removeable.~~\r\n\r\nSee comments below.","created_at":"2014-08-20T23:26:42Z","updated_at":"2015-01-15T00:38:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a081233f665439765be3eeffd816a38ef158a90e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/artefactual/archivematica/pulls/98/commits","review_comments_url":"https://api.github.com/repos/artefactual/archivematica/pulls/98/comments","review_comment_url":"https://api.github.com/repos/artefactual/archivematica/pulls/comments/{number}","comments_url":"https://api.github.com/repos/artefactual/archivematica/issues/98/comments","statuses_url":"https://api.github.com/repos/artefactual/archivematica/statuses/fda82ffefa80ab9310b78f3a4b80f3ca2063ab9f","head":{"label":"artefactual:dev/issue-7137-mcpserver_models","ref":"dev/issue-7137-mcpserver_models","sha":"fda82ffefa80ab9310b78f3a4b80f3ca2063ab9f","user":{"login":"artefactual","id":1163545,"avatar_url":"https://avatars.githubusercontent.com/u/1163545?v=3","gravatar_id":"","url":"https://api.github.com/users/artefactual","html_url":"https://github.com/artefactual","followers_url":"https://api.github.com/users/artefactual/followers","following_url":"https://api.github.com/users/artefactual/following{/other_user}","gists_url":"https://api.github.com/users/artefactual/gists{/gist_id}","starred_url":"https://api.github.com/users/artefactual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artefactual/subscriptions","organizations_url":"https://api.github.com/users/artefactual/orgs","repos_url":"https://api.github.com/users/artefactual/repos","events_url":"https://api.github.com/users/artefactual/events{/privacy}","received_events_url":"https://api.github.com/users/artefactual/received_events","type":"Organization","site_admin":false},"repo":{"id":5811958,"name":"archivematica","full_name":"artefactual/archivematica","owner":{"login":"artefactual","id":1163545,"avatar_url":"https://avatars.githubusercontent.com/u/1163545?v=3","gravatar_id":"","url":"https://api.github.com/users/artefactual","html_url":"https://github.com/artefactual","followers_url":"https://api.github.com/users/artefactual/followers","following_url":"https://api.github.com/users/artefactual/following{/other_user}","gists_url":"https://api.github.com/users/artefactual/gists{/gist_id}","starred_url":"https://api.github.com/users/artefactual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artefactual/subscriptions","organizations_url":"https://api.github.com/users/artefactual/orgs","repos_url":"https://api.github.com/users/artefactual/repos","events_url":"https://api.github.com/users/artefactual/events{/privacy}","received_events_url":"https://api.github.com/users/artefactual/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/artefactual/archivematica","description":"Free and open-source digital preservation system designed to maintain standards-based, long-term access to collections of digital objects.","fork":false,"url":"https://api.github.com/repos/artefactual/archivematica","forks_url":"https://api.github.com/repos/artefactual/archivematica/forks","keys_url":"https://api.github.com/repos/artefactual/archivematica/keys{/key_id}","collaborators_url":"https://api.github.com/repos/artefactual/archivematica/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/artefactual/archivematica/teams","hooks_url":"https://api.github.com/repos/artefactual/archivematica/hooks","issue_events_url":"https://api.github.com/repos/artefactual/archivematica/issues/events{/number}","events_url":"https://api.github.com/repos/artefactual/archivematica/events","assignees_url":"https://api.github.com/repos/artefactual/archivematica/assignees{/user}","branches_url":"https://api.github.com/repos/artefactual/archivematica/branches{/branch}","tags_url":"https://api.github.com/repos/artefactual/archivematica/tags","blobs_url":"https://api.github.com/repos/artefactual/archivematica/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/artefactual/archivematica/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/artefactual/archivematica/git/refs{/sha}","trees_url":"https://api.github.com/repos/artefactual/archivematica/git/trees{/sha}","statuses_url":"https://api.github.com/repos/artefactual/archivematica/statuses/{sha}","languages_url":"https://api.github.com/repos/artefactual/archivematica/languages","stargazers_url":"https://api.github.com/repos/artefactual/archivematica/stargazers","contributors_url":"https://api.github.com/repos/artefactual/archivematica/contributors","subscribers_url":"https://api.github.com/repos/artefactual/archivematica/subscribers","subscription_url":"https://api.github.com/repos/artefactual/archivematica/subscription","commits_url":"https://api.github.com/repos/artefactual/archivematica/commits{/sha}","git_commits_url":"https://api.github.com/repos/artefactual/archivematica/git/commits{/sha}","comments_url":"https://api.github.com/repos/artefactual/archivematica/comments{/number}","issue_comment_url":"https://api.github.com/repos/artefactual/archivematica/issues/comments/{number}","contents_url":"https://api.github.com/repos/artefactual/archivematica/contents/{+path}","compare_url":"https://api.github.com/repos/artefactual/archivematica/compare/{base}...{head}","merges_url":"https://api.github.com/repos/artefactual/archivematica/merges","archive_url":"https://api.github.com/repos/artefactual/archivematica/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/artefactual/archivematica/downloads","issues_url":"https://api.github.com/repos/artefactual/archivematica/issues{/number}","pulls_url":"https://api.github.com/repos/artefactual/archivematica/pulls{/number}","milestones_url":"https://api.github.com/repos/artefactual/archivematica/milestones{/number}","notifications_url":"https://api.github.com/repos/artefactual/archivematica/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/artefactual/archivematica/labels{/name}","releases_url":"https://api.github.com/repos/artefactual/archivematica/releases{/id}","created_at":"2012-09-14T16:43:38Z","updated_at":"2014-12-15T16:30:21Z","pushed_at":"2015-01-14T23:56:13Z","git_url":"git://github.com/artefactual/archivematica.git","ssh_url":"git@github.com:artefactual/archivematica.git","clone_url":"https://github.com/artefactual/archivematica.git","svn_url":"https://github.com/artefactual/archivematica","homepage":"http://www.archivematica.org","size":31435,"stargazers_count":51,"watchers_count":51,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":14,"forks":13,"open_issues":14,"watchers":51,"default_branch":"stable/1.3.x"}},"base":{"label":"artefactual:qa/1.x","ref":"qa/1.x","sha":"511035e177616f2cb64888e4fbf43406a2583673","user":{"login":"artefactual","id":1163545,"avatar_url":"https://avatars.githubusercontent.com/u/1163545?v=3","gravatar_id":"","url":"https://api.github.com/users/artefactual","html_url":"https://github.com/artefactual","followers_url":"https://api.github.com/users/artefactual/followers","following_url":"https://api.github.com/users/artefactual/following{/other_user}","gists_url":"https://api.github.com/users/artefactual/gists{/gist_id}","starred_url":"https://api.github.com/users/artefactual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artefactual/subscriptions","organizations_url":"https://api.github.com/users/artefactual/orgs","repos_url":"https://api.github.com/users/artefactual/repos","events_url":"https://api.github.com/users/artefactual/events{/privacy}","received_events_url":"https://api.github.com/users/artefactual/received_events","type":"Organization","site_admin":false},"repo":{"id":5811958,"name":"archivematica","full_name":"artefactual/archivematica","owner":{"login":"artefactual","id":1163545,"avatar_url":"https://avatars.githubusercontent.com/u/1163545?v=3","gravatar_id":"","url":"https://api.github.com/users/artefactual","html_url":"https://github.com/artefactual","followers_url":"https://api.github.com/users/artefactual/followers","following_url":"https://api.github.com/users/artefactual/following{/other_user}","gists_url":"https://api.github.com/users/artefactual/gists{/gist_id}","starred_url":"https://api.github.com/users/artefactual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artefactual/subscriptions","organizations_url":"https://api.github.com/users/artefactual/orgs","repos_url":"https://api.github.com/users/artefactual/repos","events_url":"https://api.github.com/users/artefactual/events{/privacy}","received_events_url":"https://api.github.com/users/artefactual/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/artefactual/archivematica","description":"Free and open-source digital preservation system designed to maintain standards-based, long-term access to collections of digital objects.","fork":false,"url":"https://api.github.com/repos/artefactual/archivematica","forks_url":"https://api.github.com/repos/artefactual/archivematica/forks","keys_url":"https://api.github.com/repos/artefactual/archivematica/keys{/key_id}","collaborators_url":"https://api.github.com/repos/artefactual/archivematica/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/artefactual/archivematica/teams","hooks_url":"https://api.github.com/repos/artefactual/archivematica/hooks","issue_events_url":"https://api.github.com/repos/artefactual/archivematica/issues/events{/number}","events_url":"https://api.github.com/repos/artefactual/archivematica/events","assignees_url":"https://api.github.com/repos/artefactual/archivematica/assignees{/user}","branches_url":"https://api.github.com/repos/artefactual/archivematica/branches{/branch}","tags_url":"https://api.github.com/repos/artefactual/archivematica/tags","blobs_url":"https://api.github.com/repos/artefactual/archivematica/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/artefactual/archivematica/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/artefactual/archivematica/git/refs{/sha}","trees_url":"https://api.github.com/repos/artefactual/archivematica/git/trees{/sha}","statuses_url":"https://api.github.com/repos/artefactual/archivematica/statuses/{sha}","languages_url":"https://api.github.com/repos/artefactual/archivematica/languages","stargazers_url":"https://api.github.com/repos/artefactual/archivematica/stargazers","contributors_url":"https://api.github.com/repos/artefactual/archivematica/contributors","subscribers_url":"https://api.github.com/repos/artefactual/archivematica/subscribers","subscription_url":"https://api.github.com/repos/artefactual/archivematica/subscription","commits_url":"https://api.github.com/repos/artefactual/archivematica/commits{/sha}","git_commits_url":"https://api.github.com/repos/artefactual/archivematica/git/commits{/sha}","comments_url":"https://api.github.com/repos/artefactual/archivematica/comments{/number}","issue_comment_url":"https://api.github.com/repos/artefactual/archivematica/issues/comments/{number}","contents_url":"https://api.github.com/repos/artefactual/archivematica/contents/{+path}","compare_url":"https://api.github.com/repos/artefactual/archivematica/compare/{base}...{head}","merges_url":"https://api.github.com/repos/artefactual/archivematica/merges","archive_url":"https://api.github.com/repos/artefactual/archivematica/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/artefactual/archivematica/downloads","issues_url":"https://api.github.com/repos/artefactual/archivematica/issues{/number}","pulls_url":"https://api.github.com/repos/artefactual/archivematica/pulls{/number}","milestones_url":"https://api.github.com/repos/artefactual/archivematica/milestones{/number}","notifications_url":"https://api.github.com/repos/artefactual/archivematica/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/artefactual/archivematica/labels{/name}","releases_url":"https://api.github.com/repos/artefactual/archivematica/releases{/id}","created_at":"2012-09-14T16:43:38Z","updated_at":"2014-12-15T16:30:21Z","pushed_at":"2015-01-14T23:56:13Z","git_url":"git://github.com/artefactual/archivematica.git","ssh_url":"git@github.com:artefactual/archivematica.git","clone_url":"https://github.com/artefactual/archivematica.git","svn_url":"https://github.com/artefactual/archivematica","homepage":"http://www.archivematica.org","size":31435,"stargazers_count":51,"watchers_count":51,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":14,"forks":13,"open_issues":14,"watchers":51,"default_branch":"stable/1.3.x"}},"_links":{"self":{"href":"https://api.github.com/repos/artefactual/archivematica/pulls/98"},"html":{"href":"https://github.com/artefactual/archivematica/pull/98"},"issue":{"href":"https://api.github.com/repos/artefactual/archivematica/issues/98"},"comments":{"href":"https://api.github.com/repos/artefactual/archivematica/issues/98/comments"},"review_comments":{"href":"https://api.github.com/repos/artefactual/archivematica/pulls/98/comments"},"review_comment":{"href":"https://api.github.com/repos/artefactual/archivematica/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/artefactual/archivematica/pulls/98/commits"},"statuses":{"href":"https://api.github.com/repos/artefactual/archivematica/statuses/fda82ffefa80ab9310b78f3a4b80f3ca2063ab9f"}}}}