fix: [attribute:quickEdit] Escalate the timestamp refresh to the Object

pull/5462/head
mokaddem 2020-01-16 11:08:41 +01:00
parent 5c97c5da53
commit 7a33b90b59
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 3 additions and 0 deletions

View File

@ -1098,6 +1098,9 @@ class AttributesController extends AppController
$event['Event']['timestamp'] = $date->getTimestamp();
$event['Event']['published'] = 0;
$this->Attribute->Event->save($event, array('fieldList' => array('published', 'timestamp', 'info')));
if ($attribute['Attribute']['object_id'] != 0) {
$this->Attribute->Object->updateTimestamp($attribute['Attribute']['object_id'], $date->getTimestamp());
}
$this->autoRender = false;
return new CakeResponse(array('body'=> json_encode(array('saved' => true, 'success' => 'Field updated.', 'check_publish' => true)), 'status'=>200, 'type' => 'json'));
} else {