{"action":"created","comment":{"url":"https://api.github.com/repos/flask-admin/flask-admin/pulls/comments/34221430","id":34221430,"diff_hunk":"@@ -254,3 +253,27 @@ def get_pk_from_identity(obj):\n     # TODO: Remove me\n     cls, key = identity_key(instance=obj)\n     return u':'.join(text_type(x) for x in key)\n+\n+\n+def get_obj_pk(obj, pk):\n+    \"\"\"\n+    get and format pk from obj\n+    :rtype: text_type\n+    \"\"\"\n+\n+    if isinstance(pk, tuple):\n+        return u':'.join(text_type(getattr(obj, k)) for k in pk)","path":"flask_admin/contrib/sqla/fields.py","position":28,"original_position":28,"commit_id":"4415b7b6bcc50f151be1ea2d975b3757353f1d48","original_commit_id":"4415b7b6bcc50f151be1ea2d975b3757353f1d48","user":{"login":"mrjoes","id":179880,"avatar_url":"https://avatars.githubusercontent.com/u/179880?v=3","gravatar_id":"","url":"https://api.github.com/users/mrjoes","html_url":"https://github.com/mrjoes","followers_url":"https://api.github.com/users/mrjoes/followers","following_url":"https://api.github.com/users/mrjoes/following{/other_user}","gists_url":"https://api.github.com/users/mrjoes/gists{/gist_id}","starred_url":"https://api.github.com/users/mrjoes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrjoes/subscriptions","organizations_url":"https://api.github.com/users/mrjoes/orgs","repos_url":"https://api.github.com/users/mrjoes/repos","events_url":"https://api.github.com/users/mrjoes/events{/privacy}","received_events_url":"https://api.github.com/users/mrjoes/received_events","type":"User","site_admin":false},"body":"I can't accept this - if you need multiple items, please use tuple. PK can be any value and it can have ':' in it.","created_at":"2015-07-09T03:42:08Z","updated_at":"2015-07-09T03:42:08Z","html_url":"https://github.com/flask-admin/flask-admin/pull/673#discussion_r34221430","pull_request_url":"https://api.github.com/repos/flask-admin/flask-admin/pulls/673","_links":{"self":{"href":"https://api.github.com/repos/flask-admin/flask-admin/pulls/comments/34221430"},"html":{"href":"https://github.com/flask-admin/flask-admin/pull/673#discussion_r34221430"},"pull_request":{"href":"https://api.github.com/repos/flask-admin/flask-admin/pulls/673"}}},"pull_request":{"url":"https://api.github.com/repos/flask-admin/flask-admin/pulls/673","id":23717313,"html_url":"https://github.com/flask-admin/flask-admin/pull/673","diff_url":"https://github.com/flask-admin/flask-admin/pull/673.diff","patch_url":"https://github.com/flask-admin/flask-admin/pull/673.patch","issue_url":"https://api.github.com/repos/flask-admin/flask-admin/issues/673","number":673,"state":"open","locked":false,"title":"Fix #672 BUG for InlineModelFormList with two primary keys","user":{"login":"lifei","id":350000,"avatar_url":"https://avatars.githubusercontent.com/u/350000?v=3","gravatar_id":"","url":"https://api.github.com/users/lifei","html_url":"https://github.com/lifei","followers_url":"https://api.github.com/users/lifei/followers","following_url":"https://api.github.com/users/lifei/following{/other_user}","gists_url":"https://api.github.com/users/lifei/gists{/gist_id}","starred_url":"https://api.github.com/users/lifei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lifei/subscriptions","organizations_url":"https://api.github.com/users/lifei/orgs","repos_url":"https://api.github.com/users/lifei/repos","events_url":"https://api.github.com/users/lifei/events{/privacy}","received_events_url":"https://api.github.com/users/lifei/received_events","type":"User","site_admin":false},"body":"the type of primary of model with two or more primary keys is tuple, which is different from that of models with one primary.\r\nInlineModelFormField and InlineModelFormList can only work with str type primary key.","created_at":"2014-11-01T08:46:12Z","updated_at":"2015-07-09T03:42:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0694e54b7984a2c11204258daa092437bd7e1c84","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/flask-admin/flask-admin/pulls/673/commits","review_comments_url":"https://api.github.com/repos/flask-admin/flask-admin/pulls/673/comments","review_comment_url":"https://api.github.com/repos/flask-admin/flask-admin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flask-admin/flask-admin/issues/673/comments","statuses_url":"https://api.github.com/repos/flask-admin/flask-admin/statuses/4415b7b6bcc50f151be1ea2d975b3757353f1d48","head":{"label":"lifei:master","ref":"master","sha":"4415b7b6bcc50f151be1ea2d975b3757353f1d48","user":{"login":"lifei","id":350000,"avatar_url":"https://avatars.githubusercontent.com/u/350000?v=3","gravatar_id":"","url":"https://api.github.com/users/lifei","html_url":"https://github.com/lifei","followers_url":"https://api.github.com/users/lifei/followers","following_url":"https://api.github.com/users/lifei/following{/other_user}","gists_url":"https://api.github.com/users/lifei/gists{/gist_id}","starred_url":"https://api.github.com/users/lifei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lifei/subscriptions","organizations_url":"https://api.github.com/users/lifei/orgs","repos_url":"https://api.github.com/users/lifei/repos","events_url":"https://api.github.com/users/lifei/events{/privacy}","received_events_url":"https://api.github.com/users/lifei/received_events","type":"User","site_admin":false},"repo":{"id":26045061,"name":"flask-admin","full_name":"lifei/flask-admin","owner":{"login":"lifei","id":350000,"avatar_url":"https://avatars.githubusercontent.com/u/350000?v=3","gravatar_id":"","url":"https://api.github.com/users/lifei","html_url":"https://github.com/lifei","followers_url":"https://api.github.com/users/lifei/followers","following_url":"https://api.github.com/users/lifei/following{/other_user}","gists_url":"https://api.github.com/users/lifei/gists{/gist_id}","starred_url":"https://api.github.com/users/lifei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lifei/subscriptions","organizations_url":"https://api.github.com/users/lifei/orgs","repos_url":"https://api.github.com/users/lifei/repos","events_url":"https://api.github.com/users/lifei/events{/privacy}","received_events_url":"https://api.github.com/users/lifei/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lifei/flask-admin","description":"Simple and extensible administrative interface framework for Flask","fork":true,"url":"https://api.github.com/repos/lifei/flask-admin","forks_url":"https://api.github.com/repos/lifei/flask-admin/forks","keys_url":"https://api.github.com/repos/lifei/flask-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lifei/flask-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lifei/flask-admin/teams","hooks_url":"https://api.github.com/repos/lifei/flask-admin/hooks","issue_events_url":"https://api.github.com/repos/lifei/flask-admin/issues/events{/number}","events_url":"https://api.github.com/repos/lifei/flask-admin/events","assignees_url":"https://api.github.com/repos/lifei/flask-admin/assignees{/user}","branches_url":"https://api.github.com/repos/lifei/flask-admin/branches{/branch}","tags_url":"https://api.github.com/repos/lifei/flask-admin/tags","blobs_url":"https://api.github.com/repos/lifei/flask-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lifei/flask-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lifei/flask-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/lifei/flask-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lifei/flask-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/lifei/flask-admin/languages","stargazers_url":"https://api.github.com/repos/lifei/flask-admin/stargazers","contributors_url":"https://api.github.com/repos/lifei/flask-admin/contributors","subscribers_url":"https://api.github.com/repos/lifei/flask-admin/subscribers","subscription_url":"https://api.github.com/repos/lifei/flask-admin/subscription","commits_url":"https://api.github.com/repos/lifei/flask-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/lifei/flask-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/lifei/flask-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/lifei/flask-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/lifei/flask-admin/contents/{+path}","compare_url":"https://api.github.com/repos/lifei/flask-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lifei/flask-admin/merges","archive_url":"https://api.github.com/repos/lifei/flask-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lifei/flask-admin/downloads","issues_url":"https://api.github.com/repos/lifei/flask-admin/issues{/number}","pulls_url":"https://api.github.com/repos/lifei/flask-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/lifei/flask-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/lifei/flask-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lifei/flask-admin/labels{/name}","releases_url":"https://api.github.com/repos/lifei/flask-admin/releases{/id}","created_at":"2014-11-01T07:54:00Z","updated_at":"2014-11-01T08:45:17Z","pushed_at":"2015-07-06T12:56:32Z","git_url":"git://github.com/lifei/flask-admin.git","ssh_url":"git@github.com:lifei/flask-admin.git","clone_url":"https://github.com/lifei/flask-admin.git","svn_url":"https://github.com/lifei/flask-admin","homepage":"","size":6949,"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":"flask-admin:master","ref":"master","sha":"ff1f982da693afcc55ab45675fa2918216273359","user":{"login":"flask-admin","id":12035958,"avatar_url":"https://avatars.githubusercontent.com/u/12035958?v=3","gravatar_id":"","url":"https://api.github.com/users/flask-admin","html_url":"https://github.com/flask-admin","followers_url":"https://api.github.com/users/flask-admin/followers","following_url":"https://api.github.com/users/flask-admin/following{/other_user}","gists_url":"https://api.github.com/users/flask-admin/gists{/gist_id}","starred_url":"https://api.github.com/users/flask-admin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flask-admin/subscriptions","organizations_url":"https://api.github.com/users/flask-admin/orgs","repos_url":"https://api.github.com/users/flask-admin/repos","events_url":"https://api.github.com/users/flask-admin/events{/privacy}","received_events_url":"https://api.github.com/users/flask-admin/received_events","type":"Organization","site_admin":false},"repo":{"id":3758878,"name":"flask-admin","full_name":"flask-admin/flask-admin","owner":{"login":"flask-admin","id":12035958,"avatar_url":"https://avatars.githubusercontent.com/u/12035958?v=3","gravatar_id":"","url":"https://api.github.com/users/flask-admin","html_url":"https://github.com/flask-admin","followers_url":"https://api.github.com/users/flask-admin/followers","following_url":"https://api.github.com/users/flask-admin/following{/other_user}","gists_url":"https://api.github.com/users/flask-admin/gists{/gist_id}","starred_url":"https://api.github.com/users/flask-admin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flask-admin/subscriptions","organizations_url":"https://api.github.com/users/flask-admin/orgs","repos_url":"https://api.github.com/users/flask-admin/repos","events_url":"https://api.github.com/users/flask-admin/events{/privacy}","received_events_url":"https://api.github.com/users/flask-admin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flask-admin/flask-admin","description":"Simple and extensible administrative interface framework for Flask","fork":false,"url":"https://api.github.com/repos/flask-admin/flask-admin","forks_url":"https://api.github.com/repos/flask-admin/flask-admin/forks","keys_url":"https://api.github.com/repos/flask-admin/flask-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flask-admin/flask-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flask-admin/flask-admin/teams","hooks_url":"https://api.github.com/repos/flask-admin/flask-admin/hooks","issue_events_url":"https://api.github.com/repos/flask-admin/flask-admin/issues/events{/number}","events_url":"https://api.github.com/repos/flask-admin/flask-admin/events","assignees_url":"https://api.github.com/repos/flask-admin/flask-admin/assignees{/user}","branches_url":"https://api.github.com/repos/flask-admin/flask-admin/branches{/branch}","tags_url":"https://api.github.com/repos/flask-admin/flask-admin/tags","blobs_url":"https://api.github.com/repos/flask-admin/flask-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flask-admin/flask-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flask-admin/flask-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/flask-admin/flask-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flask-admin/flask-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/flask-admin/flask-admin/languages","stargazers_url":"https://api.github.com/repos/flask-admin/flask-admin/stargazers","contributors_url":"https://api.github.com/repos/flask-admin/flask-admin/contributors","subscribers_url":"https://api.github.com/repos/flask-admin/flask-admin/subscribers","subscription_url":"https://api.github.com/repos/flask-admin/flask-admin/subscription","commits_url":"https://api.github.com/repos/flask-admin/flask-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/flask-admin/flask-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/flask-admin/flask-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/flask-admin/flask-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/flask-admin/flask-admin/contents/{+path}","compare_url":"https://api.github.com/repos/flask-admin/flask-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flask-admin/flask-admin/merges","archive_url":"https://api.github.com/repos/flask-admin/flask-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flask-admin/flask-admin/downloads","issues_url":"https://api.github.com/repos/flask-admin/flask-admin/issues{/number}","pulls_url":"https://api.github.com/repos/flask-admin/flask-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/flask-admin/flask-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/flask-admin/flask-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flask-admin/flask-admin/labels{/name}","releases_url":"https://api.github.com/repos/flask-admin/flask-admin/releases{/id}","created_at":"2012-03-18T23:21:57Z","updated_at":"2015-07-08T18:06:15Z","pushed_at":"2015-07-08T17:48:35Z","git_url":"git://github.com/flask-admin/flask-admin.git","ssh_url":"git@github.com:flask-admin/flask-admin.git","clone_url":"https://github.com/flask-admin/flask-admin.git","svn_url":"https://github.com/flask-admin/flask-admin","homepage":"","size":10860,"stargazers_count":1268,"watchers_count":1268,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":424,"mirror_url":null,"open_issues_count":96,"forks":424,"open_issues":96,"watchers":1268,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flask-admin/flask-admin/pulls/673"},"html":{"href":"https://github.com/flask-admin/flask-admin/pull/673"},"issue":{"href":"https://api.github.com/repos/flask-admin/flask-admin/issues/673"},"comments":{"href":"https://api.github.com/repos/flask-admin/flask-admin/issues/673/comments"},"review_comments":{"href":"https://api.github.com/repos/flask-admin/flask-admin/pulls/673/comments"},"review_comment":{"href":"https://api.github.com/repos/flask-admin/flask-admin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flask-admin/flask-admin/pulls/673/commits"},"statuses":{"href":"https://api.github.com/repos/flask-admin/flask-admin/statuses/4415b7b6bcc50f151be1ea2d975b3757353f1d48"}}}}