Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ openml_OS/third_party/OpenML/Java/old-evaluate.jar
docs/site/
*.icloud
*.DS_store
openml_OS/vendor/
openapi/vendor/
5 changes: 3 additions & 2 deletions openml_OS/models/api/v1/Api_data.php
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ private function data_fork() {
$latest_version = $this->Dataset-> getWhereSingle('`name` = "' . $dataset->name . '"', 'CAST(`version` AS DECIMAL) DESC');
$dataset->version = $latest_version->version + 1;
unset($dataset->did);

$new_data_id = $this->Dataset->insert($dataset);
if (!$new_data_id) {
$this->returnError(1072, $this->version);
Expand Down Expand Up @@ -934,7 +935,6 @@ private function data_reset($data_id) {
* ),
*)
*/

private function data_add_topic($id, $topic) {
# Data id and topic are required
if ($id == false || $topic == false) {
Expand Down Expand Up @@ -1281,6 +1281,7 @@ private function data_upload() {
$this->returnError(134, $this->version);
return;
}

$desc['did'] = $id;
$desc_id = $this->Dataset_description->insert($desc);
if (!$desc_id) {
Expand Down Expand Up @@ -1735,7 +1736,7 @@ private function data_features_upload() {
} else {
$nominal_values = false;
}

//actual insert of the feature
if (array_key_exists('ontology', $feature)) {
$ontologies = $feature['ontology'];
Expand Down
2 changes: 0 additions & 2 deletions openml_OS/views/pages/api_new/v1/xml/pre.php
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,6 @@
$this->apiErrors[1071] = 'Unknown dataset';
$this->apiErrors[1072] = 'Failed to insert record in database';


//openml.data.topic
$this->apiErrors[1080] = 'Please provide a dataset id and a topic.';
$this->apiErrors[1081] = 'Unknown dataset.';
Expand All @@ -551,5 +550,4 @@
$this->apiErrors[1104] = 'Failure to write to the database';
$this->apiErrors[1105] = 'Feature description too long';
$this->apiErrors[1106] = 'Feature description meant as ontology, but is not a valid URL';

?>