Skip to content

Commit

Permalink
Merge pull request #1265 from superdesk/SWP-2310
Browse files Browse the repository at this point in the history
Allow non published articles to be saved to content lists
  • Loading branch information
IvanJelicSF authored Oct 9, 2024
2 parents 3429f4b + aba7299 commit 4289a4f
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,12 @@ private function refreshLists(ArticleInterface $article)
/** @var ContentListItemInterface $item */
foreach ($contentListItems as $item) {
$contentList = $item->getContentList();
if (!$article->isPublished()) {
$this->manager->remove($item);
} else {
//Removing check if article is published
//if (!$article->isPublished()) {
// $this->manager->remove($item);
//} else {
$contentLists[$contentList->getId()] = $contentList;
}
//}
$item->getContentList()->setContentListItemsUpdatedAt(new \DateTime('now'));
if ($contentList instanceof TimestampableCancelInterface) {
$contentList->cancelTimestampable(true);
Expand Down

0 comments on commit 4289a4f

Please sign in to comment.