{"action":"created","comment":{"url":"https://api.github.com/repos/Chive/django-multiupload/pulls/comments/67717562","id":67717562,"diff_hunk":"@@ -53,48 +73,81 @@ def to_python(self, data):\n \n     def validate(self, data):\n         super(MultiUploadMetaField, self).validate(data)\n+\n         num_files = len(data)\n         if len(data) and not data[0]:\n             num_files = 0\n+\n         if not self.required and num_files == 0:\n             return\n+\n         if num_files < self.min_num:\n-            raise ValidationError(self.error_messages['min_num'] % {'min_num': self.min_num, 'num_files': num_files})\n-        elif self.max_num and num_files > self.max_num:\n-            raise ValidationError(self.error_messages['max_num'] % {'max_num': self.max_num, 'num_files': num_files})\n+            raise ValidationError(\n+                self.error_messages['min_num'] % {\n+                    'min_num': self.min_num,\n+                    'num_files': num_files,\n+                }\n+            )\n+        elif self.max_num is not None and num_files > self.max_num:\n+            raise ValidationError(\n+                self.error_messages['max_num'] % {\n+                    'max_num': self.max_num,\n+                    'num_files': num_files,\n+                }\n+            )\n+\n         for uploaded_file in data:\n-            if self.maximum_file_size and uploaded_file.size > self.maximum_file_size:\n-                raise ValidationError(self.error_messages['file_size'] % {'uploaded_file_name': uploaded_file.name})\n+            if self.maximum_file_size and \\","path":"multiupload/fields.py","position":97,"original_position":97,"commit_id":"c6a60bed9f1121393022bd18e288bfd68399d2ba","original_commit_id":"c6a60bed9f1121393022bd18e288bfd68399d2ba","user":{"login":"sobolevn","id":4660275,"avatar_url":"https://avatars.githubusercontent.com/u/4660275?v=3","gravatar_id":"","url":"https://api.github.com/users/sobolevn","html_url":"https://github.com/sobolevn","followers_url":"https://api.github.com/users/sobolevn/followers","following_url":"https://api.github.com/users/sobolevn/following{/other_user}","gists_url":"https://api.github.com/users/sobolevn/gists{/gist_id}","starred_url":"https://api.github.com/users/sobolevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sobolevn/subscriptions","organizations_url":"https://api.github.com/users/sobolevn/orgs","repos_url":"https://api.github.com/users/sobolevn/repos","events_url":"https://api.github.com/users/sobolevn/events{/privacy}","received_events_url":"https://api.github.com/users/sobolevn/received_events","type":"User","site_admin":false},"body":"Sure.","created_at":"2016-06-20T16:10:01Z","updated_at":"2016-06-20T16:10:01Z","html_url":"https://github.com/Chive/django-multiupload/pull/18#discussion_r67717562","pull_request_url":"https://api.github.com/repos/Chive/django-multiupload/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/Chive/django-multiupload/pulls/comments/67717562"},"html":{"href":"https://github.com/Chive/django-multiupload/pull/18#discussion_r67717562"},"pull_request":{"href":"https://api.github.com/repos/Chive/django-multiupload/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/Chive/django-multiupload/pulls/18","id":74400759,"html_url":"https://github.com/Chive/django-multiupload/pull/18","diff_url":"https://github.com/Chive/django-multiupload/pull/18.diff","patch_url":"https://github.com/Chive/django-multiupload/pull/18.patch","issue_url":"https://api.github.com/repos/Chive/django-multiupload/issues/18","number":18,"state":"open","locked":false,"title":"This commit was primary focused on stylefixes.","user":{"login":"sobolevn","id":4660275,"avatar_url":"https://avatars.githubusercontent.com/u/4660275?v=3","gravatar_id":"","url":"https://api.github.com/users/sobolevn","html_url":"https://github.com/sobolevn","followers_url":"https://api.github.com/users/sobolevn/followers","following_url":"https://api.github.com/users/sobolevn/following{/other_user}","gists_url":"https://api.github.com/users/sobolevn/gists{/gist_id}","starred_url":"https://api.github.com/users/sobolevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sobolevn/subscriptions","organizations_url":"https://api.github.com/users/sobolevn/orgs","repos_url":"https://api.github.com/users/sobolevn/repos","events_url":"https://api.github.com/users/sobolevn/events{/privacy}","received_events_url":"https://api.github.com/users/sobolevn/received_events","type":"User","site_admin":false},"body":"Stylefixes:\r\n1. added `moduledocs` and class `doc-strings`\r\n2. stylefixes\r\n3. integrated `pylint` into the `tox`-testing process\r\n\r\nBut there are a lot of other changes:\r\n1. added new classificators to the `setup.py`\r\n2. added `idea/` to `.gitignore`\r\n3. added myself to `AUTHORS`\r\n4. changed the way `LONG_DESCRIPTION` in `setup.py` was created (file was not closed)\r\n5. forced `# -*- coding: utf-8 -*-` in all files","created_at":"2016-06-20T07:40:03Z","updated_at":"2016-06-20T16:10:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94d3b521348d207073ead8be92bc777ef83dae75","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Chive/django-multiupload/pulls/18/commits","review_comments_url":"https://api.github.com/repos/Chive/django-multiupload/pulls/18/comments","review_comment_url":"https://api.github.com/repos/Chive/django-multiupload/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Chive/django-multiupload/issues/18/comments","statuses_url":"https://api.github.com/repos/Chive/django-multiupload/statuses/c6a60bed9f1121393022bd18e288bfd68399d2ba","head":{"label":"sobolevn:master","ref":"master","sha":"c6a60bed9f1121393022bd18e288bfd68399d2ba","user":{"login":"sobolevn","id":4660275,"avatar_url":"https://avatars.githubusercontent.com/u/4660275?v=3","gravatar_id":"","url":"https://api.github.com/users/sobolevn","html_url":"https://github.com/sobolevn","followers_url":"https://api.github.com/users/sobolevn/followers","following_url":"https://api.github.com/users/sobolevn/following{/other_user}","gists_url":"https://api.github.com/users/sobolevn/gists{/gist_id}","starred_url":"https://api.github.com/users/sobolevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sobolevn/subscriptions","organizations_url":"https://api.github.com/users/sobolevn/orgs","repos_url":"https://api.github.com/users/sobolevn/repos","events_url":"https://api.github.com/users/sobolevn/events{/privacy}","received_events_url":"https://api.github.com/users/sobolevn/received_events","type":"User","site_admin":false},"repo":{"id":61433871,"name":"django-multiupload","full_name":"sobolevn/django-multiupload","owner":{"login":"sobolevn","id":4660275,"avatar_url":"https://avatars.githubusercontent.com/u/4660275?v=3","gravatar_id":"","url":"https://api.github.com/users/sobolevn","html_url":"https://github.com/sobolevn","followers_url":"https://api.github.com/users/sobolevn/followers","following_url":"https://api.github.com/users/sobolevn/following{/other_user}","gists_url":"https://api.github.com/users/sobolevn/gists{/gist_id}","starred_url":"https://api.github.com/users/sobolevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sobolevn/subscriptions","organizations_url":"https://api.github.com/users/sobolevn/orgs","repos_url":"https://api.github.com/users/sobolevn/repos","events_url":"https://api.github.com/users/sobolevn/events{/privacy}","received_events_url":"https://api.github.com/users/sobolevn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sobolevn/django-multiupload","description":"Dead simple drop-in multi file upload field for Django forms using HTML5's multiple attribute.","fork":true,"url":"https://api.github.com/repos/sobolevn/django-multiupload","forks_url":"https://api.github.com/repos/sobolevn/django-multiupload/forks","keys_url":"https://api.github.com/repos/sobolevn/django-multiupload/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sobolevn/django-multiupload/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sobolevn/django-multiupload/teams","hooks_url":"https://api.github.com/repos/sobolevn/django-multiupload/hooks","issue_events_url":"https://api.github.com/repos/sobolevn/django-multiupload/issues/events{/number}","events_url":"https://api.github.com/repos/sobolevn/django-multiupload/events","assignees_url":"https://api.github.com/repos/sobolevn/django-multiupload/assignees{/user}","branches_url":"https://api.github.com/repos/sobolevn/django-multiupload/branches{/branch}","tags_url":"https://api.github.com/repos/sobolevn/django-multiupload/tags","blobs_url":"https://api.github.com/repos/sobolevn/django-multiupload/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sobolevn/django-multiupload/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sobolevn/django-multiupload/git/refs{/sha}","trees_url":"https://api.github.com/repos/sobolevn/django-multiupload/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sobolevn/django-multiupload/statuses/{sha}","languages_url":"https://api.github.com/repos/sobolevn/django-multiupload/languages","stargazers_url":"https://api.github.com/repos/sobolevn/django-multiupload/stargazers","contributors_url":"https://api.github.com/repos/sobolevn/django-multiupload/contributors","subscribers_url":"https://api.github.com/repos/sobolevn/django-multiupload/subscribers","subscription_url":"https://api.github.com/repos/sobolevn/django-multiupload/subscription","commits_url":"https://api.github.com/repos/sobolevn/django-multiupload/commits{/sha}","git_commits_url":"https://api.github.com/repos/sobolevn/django-multiupload/git/commits{/sha}","comments_url":"https://api.github.com/repos/sobolevn/django-multiupload/comments{/number}","issue_comment_url":"https://api.github.com/repos/sobolevn/django-multiupload/issues/comments{/number}","contents_url":"https://api.github.com/repos/sobolevn/django-multiupload/contents/{+path}","compare_url":"https://api.github.com/repos/sobolevn/django-multiupload/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sobolevn/django-multiupload/merges","archive_url":"https://api.github.com/repos/sobolevn/django-multiupload/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sobolevn/django-multiupload/downloads","issues_url":"https://api.github.com/repos/sobolevn/django-multiupload/issues{/number}","pulls_url":"https://api.github.com/repos/sobolevn/django-multiupload/pulls{/number}","milestones_url":"https://api.github.com/repos/sobolevn/django-multiupload/milestones{/number}","notifications_url":"https://api.github.com/repos/sobolevn/django-multiupload/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sobolevn/django-multiupload/labels{/name}","releases_url":"https://api.github.com/repos/sobolevn/django-multiupload/releases{/id}","deployments_url":"https://api.github.com/repos/sobolevn/django-multiupload/deployments","created_at":"2016-06-18T13:06:43Z","updated_at":"2016-06-18T13:06:44Z","pushed_at":"2016-06-20T07:49:22Z","git_url":"git://github.com/sobolevn/django-multiupload.git","ssh_url":"git@github.com:sobolevn/django-multiupload.git","clone_url":"https://github.com/sobolevn/django-multiupload.git","svn_url":"https://github.com/sobolevn/django-multiupload","homepage":"http://chive.ch/django-multiupload","size":34,"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":"Chive:master","ref":"master","sha":"606bc8bb8f6a2b3c67a7cd7f79b4edeb69510eda","user":{"login":"Chive","id":2700360,"avatar_url":"https://avatars.githubusercontent.com/u/2700360?v=3","gravatar_id":"","url":"https://api.github.com/users/Chive","html_url":"https://github.com/Chive","followers_url":"https://api.github.com/users/Chive/followers","following_url":"https://api.github.com/users/Chive/following{/other_user}","gists_url":"https://api.github.com/users/Chive/gists{/gist_id}","starred_url":"https://api.github.com/users/Chive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chive/subscriptions","organizations_url":"https://api.github.com/users/Chive/orgs","repos_url":"https://api.github.com/users/Chive/repos","events_url":"https://api.github.com/users/Chive/events{/privacy}","received_events_url":"https://api.github.com/users/Chive/received_events","type":"User","site_admin":false},"repo":{"id":21527116,"name":"django-multiupload","full_name":"Chive/django-multiupload","owner":{"login":"Chive","id":2700360,"avatar_url":"https://avatars.githubusercontent.com/u/2700360?v=3","gravatar_id":"","url":"https://api.github.com/users/Chive","html_url":"https://github.com/Chive","followers_url":"https://api.github.com/users/Chive/followers","following_url":"https://api.github.com/users/Chive/following{/other_user}","gists_url":"https://api.github.com/users/Chive/gists{/gist_id}","starred_url":"https://api.github.com/users/Chive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chive/subscriptions","organizations_url":"https://api.github.com/users/Chive/orgs","repos_url":"https://api.github.com/users/Chive/repos","events_url":"https://api.github.com/users/Chive/events{/privacy}","received_events_url":"https://api.github.com/users/Chive/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Chive/django-multiupload","description":"Dead simple drop-in multi file upload field for Django forms using HTML5's multiple attribute.","fork":false,"url":"https://api.github.com/repos/Chive/django-multiupload","forks_url":"https://api.github.com/repos/Chive/django-multiupload/forks","keys_url":"https://api.github.com/repos/Chive/django-multiupload/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Chive/django-multiupload/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Chive/django-multiupload/teams","hooks_url":"https://api.github.com/repos/Chive/django-multiupload/hooks","issue_events_url":"https://api.github.com/repos/Chive/django-multiupload/issues/events{/number}","events_url":"https://api.github.com/repos/Chive/django-multiupload/events","assignees_url":"https://api.github.com/repos/Chive/django-multiupload/assignees{/user}","branches_url":"https://api.github.com/repos/Chive/django-multiupload/branches{/branch}","tags_url":"https://api.github.com/repos/Chive/django-multiupload/tags","blobs_url":"https://api.github.com/repos/Chive/django-multiupload/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Chive/django-multiupload/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Chive/django-multiupload/git/refs{/sha}","trees_url":"https://api.github.com/repos/Chive/django-multiupload/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Chive/django-multiupload/statuses/{sha}","languages_url":"https://api.github.com/repos/Chive/django-multiupload/languages","stargazers_url":"https://api.github.com/repos/Chive/django-multiupload/stargazers","contributors_url":"https://api.github.com/repos/Chive/django-multiupload/contributors","subscribers_url":"https://api.github.com/repos/Chive/django-multiupload/subscribers","subscription_url":"https://api.github.com/repos/Chive/django-multiupload/subscription","commits_url":"https://api.github.com/repos/Chive/django-multiupload/commits{/sha}","git_commits_url":"https://api.github.com/repos/Chive/django-multiupload/git/commits{/sha}","comments_url":"https://api.github.com/repos/Chive/django-multiupload/comments{/number}","issue_comment_url":"https://api.github.com/repos/Chive/django-multiupload/issues/comments{/number}","contents_url":"https://api.github.com/repos/Chive/django-multiupload/contents/{+path}","compare_url":"https://api.github.com/repos/Chive/django-multiupload/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Chive/django-multiupload/merges","archive_url":"https://api.github.com/repos/Chive/django-multiupload/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Chive/django-multiupload/downloads","issues_url":"https://api.github.com/repos/Chive/django-multiupload/issues{/number}","pulls_url":"https://api.github.com/repos/Chive/django-multiupload/pulls{/number}","milestones_url":"https://api.github.com/repos/Chive/django-multiupload/milestones{/number}","notifications_url":"https://api.github.com/repos/Chive/django-multiupload/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Chive/django-multiupload/labels{/name}","releases_url":"https://api.github.com/repos/Chive/django-multiupload/releases{/id}","deployments_url":"https://api.github.com/repos/Chive/django-multiupload/deployments","created_at":"2014-07-05T19:50:12Z","updated_at":"2016-06-17T09:29:43Z","pushed_at":"2016-06-20T07:49:22Z","git_url":"git://github.com/Chive/django-multiupload.git","ssh_url":"git@github.com:Chive/django-multiupload.git","clone_url":"https://github.com/Chive/django-multiupload.git","svn_url":"https://github.com/Chive/django-multiupload","homepage":"http://chive.ch/django-multiupload","size":32,"stargazers_count":109,"watchers_count":109,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":30,"mirror_url":null,"open_issues_count":4,"forks":30,"open_issues":4,"watchers":109,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Chive/django-multiupload/pulls/18"},"html":{"href":"https://github.com/Chive/django-multiupload/pull/18"},"issue":{"href":"https://api.github.com/repos/Chive/django-multiupload/issues/18"},"comments":{"href":"https://api.github.com/repos/Chive/django-multiupload/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/Chive/django-multiupload/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/Chive/django-multiupload/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Chive/django-multiupload/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/Chive/django-multiupload/statuses/c6a60bed9f1121393022bd18e288bfd68399d2ba"}}}}
{"actor":{"display_login":"sobolevn"}}