{"action":"created","issue":{"url":"https://api.github.com/repos/gltn/stdm/issues/79","repository_url":"https://api.github.com/repos/gltn/stdm","labels_url":"https://api.github.com/repos/gltn/stdm/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/gltn/stdm/issues/79/comments","events_url":"https://api.github.com/repos/gltn/stdm/issues/79/events","html_url":"https://github.com/gltn/stdm/issues/79","id":156679776,"number":79,"title":"Failure to create profile when using admin_spatial_unit_set","user":{"login":"wondie","id":9709624,"avatar_url":"https://avatars.githubusercontent.com/u/9709624?v=3","gravatar_id":"","url":"https://api.github.com/users/wondie","html_url":"https://github.com/wondie","followers_url":"https://api.github.com/users/wondie/followers","following_url":"https://api.github.com/users/wondie/following{/other_user}","gists_url":"https://api.github.com/users/wondie/gists{/gist_id}","starred_url":"https://api.github.com/users/wondie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wondie/subscriptions","organizations_url":"https://api.github.com/users/wondie/orgs","repos_url":"https://api.github.com/users/wondie/repos","events_url":"https://api.github.com/users/wondie/events{/privacy}","received_events_url":"https://api.github.com/users/wondie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gltn/stdm/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"gkahiu","id":3840267,"avatar_url":"https://avatars.githubusercontent.com/u/3840267?v=3","gravatar_id":"","url":"https://api.github.com/users/gkahiu","html_url":"https://github.com/gkahiu","followers_url":"https://api.github.com/users/gkahiu/followers","following_url":"https://api.github.com/users/gkahiu/following{/other_user}","gists_url":"https://api.github.com/users/gkahiu/gists{/gist_id}","starred_url":"https://api.github.com/users/gkahiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkahiu/subscriptions","organizations_url":"https://api.github.com/users/gkahiu/orgs","repos_url":"https://api.github.com/users/gkahiu/repos","events_url":"https://api.github.com/users/gkahiu/events{/privacy}","received_events_url":"https://api.github.com/users/gkahiu/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/gltn/stdm/milestones/3","html_url":"https://github.com/gltn/stdm/milestones/v1.2%20Beta","labels_url":"https://api.github.com/repos/gltn/stdm/milestones/3/labels","id":1268729,"number":3,"title":"v1.2 Beta","description":"This release will focus on enhancing the configuration module, bug fixes, UX enhancements and improving the user manual.","creator":{"login":"gkahiu","id":3840267,"avatar_url":"https://avatars.githubusercontent.com/u/3840267?v=3","gravatar_id":"","url":"https://api.github.com/users/gkahiu","html_url":"https://github.com/gkahiu","followers_url":"https://api.github.com/users/gkahiu/followers","following_url":"https://api.github.com/users/gkahiu/following{/other_user}","gists_url":"https://api.github.com/users/gkahiu/gists{/gist_id}","starred_url":"https://api.github.com/users/gkahiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkahiu/subscriptions","organizations_url":"https://api.github.com/users/gkahiu/orgs","repos_url":"https://api.github.com/users/gkahiu/repos","events_url":"https://api.github.com/users/gkahiu/events{/privacy}","received_events_url":"https://api.github.com/users/gkahiu/received_events","type":"User","site_admin":false},"open_issues":24,"closed_issues":18,"state":"open","created_at":"2015-08-24T06:10:55Z","updated_at":"2016-05-25T13:47:38Z","due_on":"2017-05-30T21:00:00Z","closed_at":null},"comments":0,"created_at":"2016-05-25T07:20:18Z","updated_at":"2016-05-25T14:16:46Z","closed_at":null,"body":"When created a profile with admin_spatial_unit_set as one of the columns data type, I got the following error. The error below is related to admin_spatial_unit_set.\r\n![image](https://cloud.githubusercontent.com/assets/9709624/15531241/f46d40c4-2261-11e6-9239-90656b2efa88.png)\r\n\r\nWhen I removed admin_spatial_unit_set column, the profile is created successfully. \r\n\r\nEdit:\r\nI just found out that, the column admin_spatial_unit_set is created but it is not foreign key column. \r\nBelow is the full table creation query. \r\n\r\nCREATE TABLE tu_party\r\n(\r\n  id serial NOT NULL,\r\n  name character varying(30),\r\n  gender integer,\r\n  admin_spatial_unit integer,\r\n  CONSTRAINT tu_party_pkey PRIMARY KEY (id),\r\n  CONSTRAINT tu_party_gender_fkey FOREIGN KEY (gender)\r\n      REFERENCES tu_check_gender (id) MATCH SIMPLE\r\n      ON UPDATE NO ACTION ON DELETE NO ACTION\r\n)\r\nWITH (\r\n  OIDS=FALSE\r\n);"},"comment":{"url":"https://api.github.com/repos/gltn/stdm/issues/comments/221590048","html_url":"https://github.com/gltn/stdm/issues/79#issuecomment-221590048","issue_url":"https://api.github.com/repos/gltn/stdm/issues/79","id":221590048,"user":{"login":"gkahiu","id":3840267,"avatar_url":"https://avatars.githubusercontent.com/u/3840267?v=3","gravatar_id":"","url":"https://api.github.com/users/gkahiu","html_url":"https://github.com/gkahiu","followers_url":"https://api.github.com/users/gkahiu/followers","following_url":"https://api.github.com/users/gkahiu/following{/other_user}","gists_url":"https://api.github.com/users/gkahiu/gists{/gist_id}","starred_url":"https://api.github.com/users/gkahiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkahiu/subscriptions","organizations_url":"https://api.github.com/users/gkahiu/orgs","repos_url":"https://api.github.com/users/gkahiu/repos","events_url":"https://api.github.com/users/gkahiu/events{/privacy}","received_events_url":"https://api.github.com/users/gkahiu/received_events","type":"User","site_admin":false},"created_at":"2016-05-25T14:16:46Z","updated_at":"2016-05-25T14:16:46Z","body":"Fixed in commit [897e43f](https://github.com/gltn/stdm/commit/897e43fb0025b4aa6e9bf957215b5fdf869d2838)."}}
{"actor":{"display_login":"gkahiu"}}