{"action":"closed","issue":{"url":"https://api.github.com/repos/ODM2/ODMToolsPython/issues/256","labels_url":"https://api.github.com/repos/ODM2/ODMToolsPython/issues/256/labels{/name}","comments_url":"https://api.github.com/repos/ODM2/ODMToolsPython/issues/256/comments","events_url":"https://api.github.com/repos/ODM2/ODMToolsPython/issues/256/events","html_url":"https://github.com/ODM2/ODMToolsPython/issues/256","id":126962788,"number":256,"title":"createDataSet fails to create dataset","user":{"login":"Castronova","id":4822372,"avatar_url":"https://avatars.githubusercontent.com/u/4822372?v=3","gravatar_id":"","url":"https://api.github.com/users/Castronova","html_url":"https://github.com/Castronova","followers_url":"https://api.github.com/users/Castronova/followers","following_url":"https://api.github.com/users/Castronova/following{/other_user}","gists_url":"https://api.github.com/users/Castronova/gists{/gist_id}","starred_url":"https://api.github.com/users/Castronova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Castronova/subscriptions","organizations_url":"https://api.github.com/users/Castronova/orgs","repos_url":"https://api.github.com/users/Castronova/repos","events_url":"https://api.github.com/users/Castronova/events{/privacy}","received_events_url":"https://api.github.com/users/Castronova/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ODM2/ODMToolsPython/labels/bug","name":"bug","color":"207de5"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-15T21:35:14Z","updated_at":"2016-01-15T22:29:43Z","closed_at":"2016-01-15T22:29:43Z","body":"The `createDataset` function in createService.py fails.\r\n\r\n```\r\nfrom odm2api.ODM2.services.createService import CreateODM2\r\nwriter = CreateODM2(my_local_connection)\r\nwriter = ReadODM2(self.connection)\r\nmyDataset = writer.createDataset(dstype='my dataset',\r\n                                 dscode='my_dataset',\r\n                                 dstitle='this is my dataset'\r\n                                 dsabstract='some description')\r\n```\r\n**IntegrityError: (IntegrityError) NOT NULL constraint failed: Datasets.DatasetUUID u'INSERT INTO datasets (datasetuuid, datasettypecv, datasetcode, datasettitle, datasetabstract) VALUES (?, ?, ?, ?, ?)' (None, None, None, None, 'test')**\r\n\r\nThe `createDataset` function sets values for the following variables DatasetTypeCV, DatasetCode, DatasetTitle, DatasetAbstract, DatasetUUID.  However, these variables do not exist in the `models.py` DataSets class, instead they are named **DataSet***.  \r\n\r\nTo fix, change the variables that are set in `createService.createDataset` to match the variables defined in `models.DataSets`"}}