{"action":"created","issue":{"url":"https://api.github.com/repos/swcarpentry/amy/issues/964","repository_url":"https://api.github.com/repos/swcarpentry/amy","labels_url":"https://api.github.com/repos/swcarpentry/amy/issues/964/labels{/name}","comments_url":"https://api.github.com/repos/swcarpentry/amy/issues/964/comments","events_url":"https://api.github.com/repos/swcarpentry/amy/issues/964/events","html_url":"https://github.com/swcarpentry/amy/issues/964","id":172209681,"number":964,"title":"No check for www subdomain in organization domain","user":{"login":"narayanaditya95","id":6830800,"avatar_url":"https://avatars.githubusercontent.com/u/6830800?v=3","gravatar_id":"","url":"https://api.github.com/users/narayanaditya95","html_url":"https://github.com/narayanaditya95","followers_url":"https://api.github.com/users/narayanaditya95/followers","following_url":"https://api.github.com/users/narayanaditya95/following{/other_user}","gists_url":"https://api.github.com/users/narayanaditya95/gists{/gist_id}","starred_url":"https://api.github.com/users/narayanaditya95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narayanaditya95/subscriptions","organizations_url":"https://api.github.com/users/narayanaditya95/orgs","repos_url":"https://api.github.com/users/narayanaditya95/repos","events_url":"https://api.github.com/users/narayanaditya95/events{/privacy}","received_events_url":"https://api.github.com/users/narayanaditya95/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/swcarpentry/amy/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/swcarpentry/amy/labels/PyData","name":"PyData","color":"c2e0c6"},{"url":"https://api.github.com/repos/swcarpentry/amy/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/swcarpentry/amy/milestones/32","html_url":"https://github.com/swcarpentry/amy/milestones/v1.8","labels_url":"https://api.github.com/repos/swcarpentry/amy/milestones/32/labels","id":1892745,"number":32,"title":"v1.8","description":"","creator":{"login":"pbanaszkiewicz","id":72821,"avatar_url":"https://avatars.githubusercontent.com/u/72821?v=3","gravatar_id":"","url":"https://api.github.com/users/pbanaszkiewicz","html_url":"https://github.com/pbanaszkiewicz","followers_url":"https://api.github.com/users/pbanaszkiewicz/followers","following_url":"https://api.github.com/users/pbanaszkiewicz/following{/other_user}","gists_url":"https://api.github.com/users/pbanaszkiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/pbanaszkiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbanaszkiewicz/subscriptions","organizations_url":"https://api.github.com/users/pbanaszkiewicz/orgs","repos_url":"https://api.github.com/users/pbanaszkiewicz/repos","events_url":"https://api.github.com/users/pbanaszkiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/pbanaszkiewicz/received_events","type":"User","site_admin":false},"open_issues":29,"closed_issues":24,"state":"open","created_at":"2016-07-19T19:02:01Z","updated_at":"2016-09-03T08:00:43Z","due_on":"2016-08-19T00:00:00Z","closed_at":null},"comments":13,"created_at":"2016-08-19T20:03:36Z","updated_at":"2016-09-03T08:35:20Z","closed_at":null,"body":"Currently, we allow organizations with the domain that contains the `www` subdomain. For eg: Google can exist as `www.google.com` as well as `google.com`, leading to `IntegrityError` while saving the first while the second exists.\r\n\r\nShouldn't we enforce one URL pattern and trim/add `www` to the `domain` field when saving an organization?\r\n\r\nTestcase:\r\n\r\n```py\r\nIn [5]: Organization.objects.create(fullname='Google', domain='google.com')\r\nOut[5]: <Organization: google.com>\r\n\r\nIn [6]: Organization.objects.create(fullname='Google', domain='www.google.com')\r\n---------------------------------------------------------------------------\r\nIntegrityError                            Traceback (most recent call last)\r\n```"},"comment":{"url":"https://api.github.com/repos/swcarpentry/amy/issues/comments/244534647","html_url":"https://github.com/swcarpentry/amy/issues/964#issuecomment-244534647","issue_url":"https://api.github.com/repos/swcarpentry/amy/issues/964","id":244534647,"user":{"login":"pbanaszkiewicz","id":72821,"avatar_url":"https://avatars.githubusercontent.com/u/72821?v=3","gravatar_id":"","url":"https://api.github.com/users/pbanaszkiewicz","html_url":"https://github.com/pbanaszkiewicz","followers_url":"https://api.github.com/users/pbanaszkiewicz/followers","following_url":"https://api.github.com/users/pbanaszkiewicz/following{/other_user}","gists_url":"https://api.github.com/users/pbanaszkiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/pbanaszkiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbanaszkiewicz/subscriptions","organizations_url":"https://api.github.com/users/pbanaszkiewicz/orgs","repos_url":"https://api.github.com/users/pbanaszkiewicz/repos","events_url":"https://api.github.com/users/pbanaszkiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/pbanaszkiewicz/received_events","type":"User","site_admin":false},"created_at":"2016-09-03T08:35:20Z","updated_at":"2016-09-03T08:35:20Z","body":"> And I believe there exist organizations that serve different content on the root domain and the www subdomain.\r\n\r\nLike… organizations that we have in the DB?"}}
{"actor":{"display_login":"pbanaszkiewicz"}}