fix bug when editing attributes

pull/61/head
Christophe Vandeplas 2012-05-16 11:19:06 +02:00
parent 6da1906bf4
commit 9e2c2c5753
1 changed files with 3 additions and 2 deletions

View File

@ -315,8 +315,9 @@ class AttributesController extends AppController {
if ($this->Attribute->save($this->request->data, true, $fieldList)) {
$this->Session->setFlash(__('The attribute has been saved'));
// remove the published flag from the event
$this->Event->id = $this->request->data['Attribute']['event_id'];
// remove the published flag from the event
$this->loadModel('Event');
$this->Event->id = $event_id;
$this->Event->saveField('published', 0);