{"action":"closed","number":1155,"pull_request":{"url":"https://api.github.com/repos/flask-admin/flask-admin/pulls/1155","id":54433864,"html_url":"https://github.com/flask-admin/flask-admin/pull/1155","diff_url":"https://github.com/flask-admin/flask-admin/pull/1155.diff","patch_url":"https://github.com/flask-admin/flask-admin/pull/1155.patch","issue_url":"https://api.github.com/repos/flask-admin/flask-admin/issues/1155","number":1155,"state":"closed","locked":false,"title":"SQLA - Use database defaults for number of decimal places in DecimalFields","user":{"login":"pawl","id":992533,"avatar_url":"https://avatars.githubusercontent.com/u/992533?v=3","gravatar_id":"","url":"https://api.github.com/users/pawl","html_url":"https://github.com/pawl","followers_url":"https://api.github.com/users/pawl/followers","following_url":"https://api.github.com/users/pawl/following{/other_user}","gists_url":"https://api.github.com/users/pawl/gists{/gist_id}","starred_url":"https://api.github.com/users/pawl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pawl/subscriptions","organizations_url":"https://api.github.com/users/pawl/orgs","repos_url":"https://api.github.com/users/pawl/repos","events_url":"https://api.github.com/users/pawl/events{/privacy}","received_events_url":"https://api.github.com/users/pawl/received_events","type":"User","site_admin":false},"body":"Fixes #1141 \r\n\r\nThis pull request prevents WTForms' DecimalFields from defaulting to 2 decimal places. It will use SQLAlchemy/database defaults instead.\r\n\r\nI cleaned up the type converters a bit by removing some unnecessary types. I also removed the converter for `databases.mysql.MSYear`, because that type hasn't been used since SQLAlchemy 0.5 (released like 6 years ago). If we want to be compatible with SQLAlchemy 0.5, we would need to add other field types (MSText, MSDateTime, etc) anyway.\r\n\r\nAlso fixes UUID fields, `dialects.postgresql.base.UUID` didn't appear to work in SQLAlchemy 0.7 or 1.0, but `sqlalchemy.dialects.postgresql.base.UUID` works.\r\n\r\nThis required a surprising amount of research, my notes are here: http://www.paulsprogrammingnotes.com/2015/12/sqlalchemys-scale-argument-wtforms.html","created_at":"2015-12-23T01:38:28Z","updated_at":"2015-12-23T02:44:11Z","closed_at":"2015-12-23T02:44:11Z","merged_at":"2015-12-23T02:44:11Z","merge_commit_sha":"3b44531210ac85667f9854e6e2e3f3793857d363","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/flask-admin/flask-admin/pulls/1155/commits","review_comments_url":"https://api.github.com/repos/flask-admin/flask-admin/pulls/1155/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/1155/comments","statuses_url":"https://api.github.com/repos/flask-admin/flask-admin/statuses/b3db9b7de03d8266ae1ee793fbcc5fb46e4b82a3","head":{"label":"pawl:fix_1141","ref":"fix_1141","sha":"b3db9b7de03d8266ae1ee793fbcc5fb46e4b82a3","user":{"login":"pawl","id":992533,"avatar_url":"https://avatars.githubusercontent.com/u/992533?v=3","gravatar_id":"","url":"https://api.github.com/users/pawl","html_url":"https://github.com/pawl","followers_url":"https://api.github.com/users/pawl/followers","following_url":"https://api.github.com/users/pawl/following{/other_user}","gists_url":"https://api.github.com/users/pawl/gists{/gist_id}","starred_url":"https://api.github.com/users/pawl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pawl/subscriptions","organizations_url":"https://api.github.com/users/pawl/orgs","repos_url":"https://api.github.com/users/pawl/repos","events_url":"https://api.github.com/users/pawl/events{/privacy}","received_events_url":"https://api.github.com/users/pawl/received_events","type":"User","site_admin":false},"repo":{"id":26785545,"name":"flask-admin","full_name":"pawl/flask-admin","owner":{"login":"pawl","id":992533,"avatar_url":"https://avatars.githubusercontent.com/u/992533?v=3","gravatar_id":"","url":"https://api.github.com/users/pawl","html_url":"https://github.com/pawl","followers_url":"https://api.github.com/users/pawl/followers","following_url":"https://api.github.com/users/pawl/following{/other_user}","gists_url":"https://api.github.com/users/pawl/gists{/gist_id}","starred_url":"https://api.github.com/users/pawl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pawl/subscriptions","organizations_url":"https://api.github.com/users/pawl/orgs","repos_url":"https://api.github.com/users/pawl/repos","events_url":"https://api.github.com/users/pawl/events{/privacy}","received_events_url":"https://api.github.com/users/pawl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pawl/flask-admin","description":"Simple and extensible administrative interface framework for Flask","fork":true,"url":"https://api.github.com/repos/pawl/flask-admin","forks_url":"https://api.github.com/repos/pawl/flask-admin/forks","keys_url":"https://api.github.com/repos/pawl/flask-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pawl/flask-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pawl/flask-admin/teams","hooks_url":"https://api.github.com/repos/pawl/flask-admin/hooks","issue_events_url":"https://api.github.com/repos/pawl/flask-admin/issues/events{/number}","events_url":"https://api.github.com/repos/pawl/flask-admin/events","assignees_url":"https://api.github.com/repos/pawl/flask-admin/assignees{/user}","branches_url":"https://api.github.com/repos/pawl/flask-admin/branches{/branch}","tags_url":"https://api.github.com/repos/pawl/flask-admin/tags","blobs_url":"https://api.github.com/repos/pawl/flask-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pawl/flask-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pawl/flask-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/pawl/flask-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pawl/flask-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/pawl/flask-admin/languages","stargazers_url":"https://api.github.com/repos/pawl/flask-admin/stargazers","contributors_url":"https://api.github.com/repos/pawl/flask-admin/contributors","subscribers_url":"https://api.github.com/repos/pawl/flask-admin/subscribers","subscription_url":"https://api.github.com/repos/pawl/flask-admin/subscription","commits_url":"https://api.github.com/repos/pawl/flask-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/pawl/flask-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/pawl/flask-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/pawl/flask-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/pawl/flask-admin/contents/{+path}","compare_url":"https://api.github.com/repos/pawl/flask-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pawl/flask-admin/merges","archive_url":"https://api.github.com/repos/pawl/flask-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pawl/flask-admin/downloads","issues_url":"https://api.github.com/repos/pawl/flask-admin/issues{/number}","pulls_url":"https://api.github.com/repos/pawl/flask-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/pawl/flask-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/pawl/flask-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pawl/flask-admin/labels{/name}","releases_url":"https://api.github.com/repos/pawl/flask-admin/releases{/id}","created_at":"2014-11-18T01:08:33Z","updated_at":"2015-07-23T07:29:00Z","pushed_at":"2015-12-23T01:08:37Z","git_url":"git://github.com/pawl/flask-admin.git","ssh_url":"git@github.com:pawl/flask-admin.git","clone_url":"https://github.com/pawl/flask-admin.git","svn_url":"https://github.com/pawl/flask-admin","homepage":"","size":9450,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"flask-admin:master","ref":"master","sha":"f6a0348b9f2a750f7231c6816a6e43c37717e6f9","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-12-22T16:48:02Z","pushed_at":"2015-12-23T02:44:11Z","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":10713,"stargazers_count":1494,"watchers_count":1494,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":518,"mirror_url":null,"open_issues_count":134,"forks":518,"open_issues":134,"watchers":1494,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flask-admin/flask-admin/pulls/1155"},"html":{"href":"https://github.com/flask-admin/flask-admin/pull/1155"},"issue":{"href":"https://api.github.com/repos/flask-admin/flask-admin/issues/1155"},"comments":{"href":"https://api.github.com/repos/flask-admin/flask-admin/issues/1155/comments"},"review_comments":{"href":"https://api.github.com/repos/flask-admin/flask-admin/pulls/1155/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/1155/commits"},"statuses":{"href":"https://api.github.com/repos/flask-admin/flask-admin/statuses/b3db9b7de03d8266ae1ee793fbcc5fb46e4b82a3"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"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},"comments":0,"review_comments":0,"commits":1,"additions":10,"deletions":19,"changed_files":1}}