Attempt to prevent article term fixes from changing the updated time of all our articles
This commit is contained in:
parent
6c1787c9c2
commit
f27a41a12a
1 changed files with 2 additions and 0 deletions
|
@ -95,6 +95,8 @@ function apply_term($term_id, $entity_ids) {
|
|||
if ($add_term == TRUE) {
|
||||
$entity_terms = array_merge($entity->get('field_article_type')->getValue(), [['target_id' => $term_id]]);
|
||||
$entity->set('field_article_type', $entity_terms);
|
||||
// Prevent this cleanup from changing the updated time of all our articles.
|
||||
$entity->setChangedTime($entity->getChangedTime());
|
||||
$entity->save();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue