Skip to content

Commit

Permalink
LPS-160248 Add a condition to take into account that a friendly URL i…
Browse files Browse the repository at this point in the history
…s not required when updating articles in the global staging group
  • Loading branch information
lfbesada authored and brianchandotcom committed Aug 13, 2022
1 parent 7028010 commit 7ad7517
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5836,7 +5836,12 @@ public JournalArticle updateArticle(
Group companyGroup = _groupLocalService.getCompanyGroup(
article.getCompanyId());

if (article.getGroupId() != companyGroup.getGroupId()) {
Group companyStagingGroup = companyGroup.getStagingGroup();

if ((article.getGroupId() != companyGroup.getGroupId()) &&
((companyStagingGroup == null) ||
(companyStagingGroup.getGroupId() != article.getGroupId()))) {

throw new ArticleFriendlyURLException();
}
}
Expand Down

0 comments on commit 7ad7517

Please sign in to comment.