{"action":"created","comment":{"url":"https://api.github.com/repos/openprocurement/openprocurement.api/pulls/comments/88660053","pull_request_review_id":9227808,"id":88660053,"diff_hunk":"@@ -325,12 +329,47 @@ class Address(Model):\n     countryName_ru = StringType()\n \n \n+def validate_location(data, value):\n+    if isinstance(data['__parent__'], Model):\n+        parent_object = data.get('__parent__', {}).get('__parent__', {})\n+        if parent_object.get('revisions') and parent_object['revisions'][0].date > \\\n+                ITEMS_LOCATION_VALIDATION_FROM and 'latitude' in data:\n+            valid_value = coordinates_reg_exp.match(str(value))\n+            if valid_value is not None and valid_value.group() == str(value):\n+                return dict(is_instance=True, is_valid=True)","path":"src/openprocurement/api/models.py","position":28,"original_position":28,"commit_id":"b4450af461fff8c5f2db64a5dd74d53bc8b85031","original_commit_id":"b4450af461fff8c5f2db64a5dd74d53bc8b85031","user":{"login":"vmaksymiv","id":1164532,"avatar_url":"https://avatars.githubusercontent.com/u/1164532?v=3","gravatar_id":"","url":"https://api.github.com/users/vmaksymiv","html_url":"https://github.com/vmaksymiv","followers_url":"https://api.github.com/users/vmaksymiv/followers","following_url":"https://api.github.com/users/vmaksymiv/following{/other_user}","gists_url":"https://api.github.com/users/vmaksymiv/gists{/gist_id}","starred_url":"https://api.github.com/users/vmaksymiv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmaksymiv/subscriptions","organizations_url":"https://api.github.com/users/vmaksymiv/orgs","repos_url":"https://api.github.com/users/vmaksymiv/repos","events_url":"https://api.github.com/users/vmaksymiv/events{/privacy}","received_events_url":"https://api.github.com/users/vmaksymiv/received_events","type":"User","site_admin":false},"body":"Тут достатньо return True","created_at":"2016-11-18T13:52:35Z","updated_at":"2016-11-18T13:52:35Z","html_url":"https://github.com/openprocurement/openprocurement.api/pull/134#discussion_r88660053","pull_request_url":"https://api.github.com/repos/openprocurement/openprocurement.api/pulls/134","_links":{"self":{"href":"https://api.github.com/repos/openprocurement/openprocurement.api/pulls/comments/88660053"},"html":{"href":"https://github.com/openprocurement/openprocurement.api/pull/134#discussion_r88660053"},"pull_request":{"href":"https://api.github.com/repos/openprocurement/openprocurement.api/pulls/134"}}},"pull_request":{"url":"https://api.github.com/repos/openprocurement/openprocurement.api/pulls/134","id":94339113,"html_url":"https://github.com/openprocurement/openprocurement.api/pull/134","diff_url":"https://github.com/openprocurement/openprocurement.api/pull/134.diff","patch_url":"https://github.com/openprocurement/openprocurement.api/pull/134.patch","issue_url":"https://api.github.com/repos/openprocurement/openprocurement.api/issues/134","number":134,"state":"open","locked":false,"title":"Add deliveryLocation validate","user":{"login":"VDigitall","id":6977678,"avatar_url":"https://avatars.githubusercontent.com/u/6977678?v=3","gravatar_id":"","url":"https://api.github.com/users/VDigitall","html_url":"https://github.com/VDigitall","followers_url":"https://api.github.com/users/VDigitall/followers","following_url":"https://api.github.com/users/VDigitall/following{/other_user}","gists_url":"https://api.github.com/users/VDigitall/gists{/gist_id}","starred_url":"https://api.github.com/users/VDigitall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VDigitall/subscriptions","organizations_url":"https://api.github.com/users/VDigitall/orgs","repos_url":"https://api.github.com/users/VDigitall/repos","events_url":"https://api.github.com/users/VDigitall/events{/privacy}","received_events_url":"https://api.github.com/users/VDigitall/received_events","type":"User","site_admin":false},"body":"\n\n<!-- Reviewable:start -->\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/openprocurement/openprocurement.api/134)\n<!-- Reviewable:end -->\n","created_at":"2016-11-18T10:42:03Z","updated_at":"2016-11-18T13:52:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b9911d25d14f7fbc829df02d4ce0492c92d3986","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openprocurement/openprocurement.api/pulls/134/commits","review_comments_url":"https://api.github.com/repos/openprocurement/openprocurement.api/pulls/134/comments","review_comment_url":"https://api.github.com/repos/openprocurement/openprocurement.api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openprocurement/openprocurement.api/issues/134/comments","statuses_url":"https://api.github.com/repos/openprocurement/openprocurement.api/statuses/b4450af461fff8c5f2db64a5dd74d53bc8b85031","head":{"label":"VDigitall:a200894405797627_validate_deliveryLocation","ref":"a200894405797627_validate_deliveryLocation","sha":"b4450af461fff8c5f2db64a5dd74d53bc8b85031","user":{"login":"VDigitall","id":6977678,"avatar_url":"https://avatars.githubusercontent.com/u/6977678?v=3","gravatar_id":"","url":"https://api.github.com/users/VDigitall","html_url":"https://github.com/VDigitall","followers_url":"https://api.github.com/users/VDigitall/followers","following_url":"https://api.github.com/users/VDigitall/following{/other_user}","gists_url":"https://api.github.com/users/VDigitall/gists{/gist_id}","starred_url":"https://api.github.com/users/VDigitall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VDigitall/subscriptions","organizations_url":"https://api.github.com/users/VDigitall/orgs","repos_url":"https://api.github.com/users/VDigitall/repos","events_url":"https://api.github.com/users/VDigitall/events{/privacy}","received_events_url":"https://api.github.com/users/VDigitall/received_events","type":"User","site_admin":false},"repo":{"id":72439715,"name":"openprocurement.api","full_name":"VDigitall/openprocurement.api","owner":{"login":"VDigitall","id":6977678,"avatar_url":"https://avatars.githubusercontent.com/u/6977678?v=3","gravatar_id":"","url":"https://api.github.com/users/VDigitall","html_url":"https://github.com/VDigitall","followers_url":"https://api.github.com/users/VDigitall/followers","following_url":"https://api.github.com/users/VDigitall/following{/other_user}","gists_url":"https://api.github.com/users/VDigitall/gists{/gist_id}","starred_url":"https://api.github.com/users/VDigitall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VDigitall/subscriptions","organizations_url":"https://api.github.com/users/VDigitall/orgs","repos_url":"https://api.github.com/users/VDigitall/repos","events_url":"https://api.github.com/users/VDigitall/events{/privacy}","received_events_url":"https://api.github.com/users/VDigitall/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/VDigitall/openprocurement.api","description":"API interface to OpenProcurement database","fork":true,"url":"https://api.github.com/repos/VDigitall/openprocurement.api","forks_url":"https://api.github.com/repos/VDigitall/openprocurement.api/forks","keys_url":"https://api.github.com/repos/VDigitall/openprocurement.api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VDigitall/openprocurement.api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VDigitall/openprocurement.api/teams","hooks_url":"https://api.github.com/repos/VDigitall/openprocurement.api/hooks","issue_events_url":"https://api.github.com/repos/VDigitall/openprocurement.api/issues/events{/number}","events_url":"https://api.github.com/repos/VDigitall/openprocurement.api/events","assignees_url":"https://api.github.com/repos/VDigitall/openprocurement.api/assignees{/user}","branches_url":"https://api.github.com/repos/VDigitall/openprocurement.api/branches{/branch}","tags_url":"https://api.github.com/repos/VDigitall/openprocurement.api/tags","blobs_url":"https://api.github.com/repos/VDigitall/openprocurement.api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VDigitall/openprocurement.api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VDigitall/openprocurement.api/git/refs{/sha}","trees_url":"https://api.github.com/repos/VDigitall/openprocurement.api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VDigitall/openprocurement.api/statuses/{sha}","languages_url":"https://api.github.com/repos/VDigitall/openprocurement.api/languages","stargazers_url":"https://api.github.com/repos/VDigitall/openprocurement.api/stargazers","contributors_url":"https://api.github.com/repos/VDigitall/openprocurement.api/contributors","subscribers_url":"https://api.github.com/repos/VDigitall/openprocurement.api/subscribers","subscription_url":"https://api.github.com/repos/VDigitall/openprocurement.api/subscription","commits_url":"https://api.github.com/repos/VDigitall/openprocurement.api/commits{/sha}","git_commits_url":"https://api.github.com/repos/VDigitall/openprocurement.api/git/commits{/sha}","comments_url":"https://api.github.com/repos/VDigitall/openprocurement.api/comments{/number}","issue_comment_url":"https://api.github.com/repos/VDigitall/openprocurement.api/issues/comments{/number}","contents_url":"https://api.github.com/repos/VDigitall/openprocurement.api/contents/{+path}","compare_url":"https://api.github.com/repos/VDigitall/openprocurement.api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VDigitall/openprocurement.api/merges","archive_url":"https://api.github.com/repos/VDigitall/openprocurement.api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VDigitall/openprocurement.api/downloads","issues_url":"https://api.github.com/repos/VDigitall/openprocurement.api/issues{/number}","pulls_url":"https://api.github.com/repos/VDigitall/openprocurement.api/pulls{/number}","milestones_url":"https://api.github.com/repos/VDigitall/openprocurement.api/milestones{/number}","notifications_url":"https://api.github.com/repos/VDigitall/openprocurement.api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VDigitall/openprocurement.api/labels{/name}","releases_url":"https://api.github.com/repos/VDigitall/openprocurement.api/releases{/id}","deployments_url":"https://api.github.com/repos/VDigitall/openprocurement.api/deployments","created_at":"2016-10-31T13:38:21Z","updated_at":"2016-10-31T13:38:22Z","pushed_at":"2016-11-18T13:14:55Z","git_url":"git://github.com/VDigitall/openprocurement.api.git","ssh_url":"git@github.com:VDigitall/openprocurement.api.git","clone_url":"https://github.com/VDigitall/openprocurement.api.git","svn_url":"https://github.com/VDigitall/openprocurement.api","homepage":null,"size":3845,"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":"openprocurement:production","ref":"production","sha":"828c563a929da62d76779c9d46d940d9e478c5b1","user":{"login":"openprocurement","id":8692431,"avatar_url":"https://avatars.githubusercontent.com/u/8692431?v=3","gravatar_id":"","url":"https://api.github.com/users/openprocurement","html_url":"https://github.com/openprocurement","followers_url":"https://api.github.com/users/openprocurement/followers","following_url":"https://api.github.com/users/openprocurement/following{/other_user}","gists_url":"https://api.github.com/users/openprocurement/gists{/gist_id}","starred_url":"https://api.github.com/users/openprocurement/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openprocurement/subscriptions","organizations_url":"https://api.github.com/users/openprocurement/orgs","repos_url":"https://api.github.com/users/openprocurement/repos","events_url":"https://api.github.com/users/openprocurement/events{/privacy}","received_events_url":"https://api.github.com/users/openprocurement/received_events","type":"Organization","site_admin":false},"repo":{"id":25218679,"name":"openprocurement.api","full_name":"openprocurement/openprocurement.api","owner":{"login":"openprocurement","id":8692431,"avatar_url":"https://avatars.githubusercontent.com/u/8692431?v=3","gravatar_id":"","url":"https://api.github.com/users/openprocurement","html_url":"https://github.com/openprocurement","followers_url":"https://api.github.com/users/openprocurement/followers","following_url":"https://api.github.com/users/openprocurement/following{/other_user}","gists_url":"https://api.github.com/users/openprocurement/gists{/gist_id}","starred_url":"https://api.github.com/users/openprocurement/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openprocurement/subscriptions","organizations_url":"https://api.github.com/users/openprocurement/orgs","repos_url":"https://api.github.com/users/openprocurement/repos","events_url":"https://api.github.com/users/openprocurement/events{/privacy}","received_events_url":"https://api.github.com/users/openprocurement/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openprocurement/openprocurement.api","description":"API interface to OpenProcurement database","fork":false,"url":"https://api.github.com/repos/openprocurement/openprocurement.api","forks_url":"https://api.github.com/repos/openprocurement/openprocurement.api/forks","keys_url":"https://api.github.com/repos/openprocurement/openprocurement.api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openprocurement/openprocurement.api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openprocurement/openprocurement.api/teams","hooks_url":"https://api.github.com/repos/openprocurement/openprocurement.api/hooks","issue_events_url":"https://api.github.com/repos/openprocurement/openprocurement.api/issues/events{/number}","events_url":"https://api.github.com/repos/openprocurement/openprocurement.api/events","assignees_url":"https://api.github.com/repos/openprocurement/openprocurement.api/assignees{/user}","branches_url":"https://api.github.com/repos/openprocurement/openprocurement.api/branches{/branch}","tags_url":"https://api.github.com/repos/openprocurement/openprocurement.api/tags","blobs_url":"https://api.github.com/repos/openprocurement/openprocurement.api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openprocurement/openprocurement.api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openprocurement/openprocurement.api/git/refs{/sha}","trees_url":"https://api.github.com/repos/openprocurement/openprocurement.api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openprocurement/openprocurement.api/statuses/{sha}","languages_url":"https://api.github.com/repos/openprocurement/openprocurement.api/languages","stargazers_url":"https://api.github.com/repos/openprocurement/openprocurement.api/stargazers","contributors_url":"https://api.github.com/repos/openprocurement/openprocurement.api/contributors","subscribers_url":"https://api.github.com/repos/openprocurement/openprocurement.api/subscribers","subscription_url":"https://api.github.com/repos/openprocurement/openprocurement.api/subscription","commits_url":"https://api.github.com/repos/openprocurement/openprocurement.api/commits{/sha}","git_commits_url":"https://api.github.com/repos/openprocurement/openprocurement.api/git/commits{/sha}","comments_url":"https://api.github.com/repos/openprocurement/openprocurement.api/comments{/number}","issue_comment_url":"https://api.github.com/repos/openprocurement/openprocurement.api/issues/comments{/number}","contents_url":"https://api.github.com/repos/openprocurement/openprocurement.api/contents/{+path}","compare_url":"https://api.github.com/repos/openprocurement/openprocurement.api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openprocurement/openprocurement.api/merges","archive_url":"https://api.github.com/repos/openprocurement/openprocurement.api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openprocurement/openprocurement.api/downloads","issues_url":"https://api.github.com/repos/openprocurement/openprocurement.api/issues{/number}","pulls_url":"https://api.github.com/repos/openprocurement/openprocurement.api/pulls{/number}","milestones_url":"https://api.github.com/repos/openprocurement/openprocurement.api/milestones{/number}","notifications_url":"https://api.github.com/repos/openprocurement/openprocurement.api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openprocurement/openprocurement.api/labels{/name}","releases_url":"https://api.github.com/repos/openprocurement/openprocurement.api/releases{/id}","deployments_url":"https://api.github.com/repos/openprocurement/openprocurement.api/deployments","created_at":"2014-10-14T17:42:51Z","updated_at":"2016-11-17T05:09:21Z","pushed_at":"2016-11-18T13:15:00Z","git_url":"git://github.com/openprocurement/openprocurement.api.git","ssh_url":"git@github.com:openprocurement/openprocurement.api.git","clone_url":"https://github.com/openprocurement/openprocurement.api.git","svn_url":"https://github.com/openprocurement/openprocurement.api","homepage":null,"size":4709,"stargazers_count":32,"watchers_count":32,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":11,"forks":26,"open_issues":11,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openprocurement/openprocurement.api/pulls/134"},"html":{"href":"https://github.com/openprocurement/openprocurement.api/pull/134"},"issue":{"href":"https://api.github.com/repos/openprocurement/openprocurement.api/issues/134"},"comments":{"href":"https://api.github.com/repos/openprocurement/openprocurement.api/issues/134/comments"},"review_comments":{"href":"https://api.github.com/repos/openprocurement/openprocurement.api/pulls/134/comments"},"review_comment":{"href":"https://api.github.com/repos/openprocurement/openprocurement.api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openprocurement/openprocurement.api/pulls/134/commits"},"statuses":{"href":"https://api.github.com/repos/openprocurement/openprocurement.api/statuses/b4450af461fff8c5f2db64a5dd74d53bc8b85031"}}}}
{"actor":{"display_login":"vmaksymiv"}}