Fix creation and update timestamps for notification history newsletters
This commit is contained in:
@@ -126,6 +126,11 @@ class Newsletter extends Model {
|
|||||||
$notification_history = self::create();
|
$notification_history = self::create();
|
||||||
$notification_history->hydrate($data);
|
$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();
|
$notification_history->save();
|
||||||
|
|
||||||
if($notification_history->getErrors() === false) {
|
if($notification_history->getErrors() === false) {
|
||||||
@@ -638,4 +643,4 @@ class Newsletter extends Model {
|
|||||||
}
|
}
|
||||||
return $orm->findMany();
|
return $orm->findMany();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user