Fix creation and update timestamps for notification history newsletters

This commit is contained in:
Tautvidas Sipavičius
2016-08-02 16:44:52 +03:00
parent 5624f4c7a0
commit 9469ce83f1

View File

@@ -126,6 +126,11 @@ class Newsletter extends Model {
$notification_history = self::create();
$notification_history->hydrate($data);
// reset timestamps
$notification_history->set_expr('created_at', 'NOW()');
$notification_history->set_expr('updated_at', 'NOW()');
$notification_history->set_expr('deleted_at', 'NULL');
$notification_history->save();
if($notification_history->getErrors() === false) {