fix: /feeds/add endpoint returns empty 'name' error via api call

pull/7427/head
Luciano Righetti 2021-05-21 09:43:55 +02:00
parent cb6ee8caf9
commit 644161f42a
1 changed files with 3 additions and 3 deletions

View File

@ -202,9 +202,6 @@ class FeedsController extends AppController
$tags = $this->Event->EventTag->Tag->find('list', array('fields' => array('Tag.name'), 'order' => array('lower(Tag.name) asc')));
$tags[0] = 'None';
$this->set('tags', $tags);
if (!isset($this->request->data['Feed']['fixed_event'])) {
$this->request->data['Feed']['fixed_event'] = 1;
}
$this->set('orgs', $this->Event->Orgc->find('list', array(
'fields' => array('id', 'name'),
'order' => 'LOWER(name)'
@ -221,6 +218,9 @@ class FeedsController extends AppController
}
}
}
if (!isset($this->request->data['Feed']['fixed_event'])) {
$this->request->data['Feed']['fixed_event'] = 1;
}
$error = false;
if (isset($this->request->data['Feed']['pull_rules'])) {
$this->request->data['Feed']['rules'] = $this->request->data['Feed']['pull_rules'];