Skip to content

Commit

Permalink
Revert "LPS-200477 Moves logic to ModelListener class"
Browse files Browse the repository at this point in the history
This reverts commit 37dac2c.
  • Loading branch information
ealonso authored and brianchandotcom committed Dec 4, 2023
1 parent ceec946 commit 6cb0893
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,21 @@ public AssetDisplayPageEntry addAssetDisplayPageEntry(
assetDisplayPageEntry.setPlid(
_getPlid(classNameId, classPK, layoutPageTemplateEntryId));

return assetDisplayPageEntryPersistence.update(assetDisplayPageEntry);
assetDisplayPageEntry = assetDisplayPageEntryPersistence.update(
assetDisplayPageEntry);

LayoutPageTemplateEntry layoutPageTemplateEntry =
_layoutPageTemplateEntryLocalService.fetchLayoutPageTemplateEntry(
layoutPageTemplateEntryId);

if (layoutPageTemplateEntry != null) {
layoutPageTemplateEntry.setModifiedDate(new Date());

_layoutPageTemplateEntryLocalService.updateLayoutPageTemplateEntry(
layoutPageTemplateEntry);
}

return assetDisplayPageEntry;
}

@Override
Expand Down Expand Up @@ -212,7 +226,21 @@ public AssetDisplayPageEntry updateAssetDisplayPageEntry(

assetDisplayPageEntry.setPlid(plid);

return assetDisplayPageEntryPersistence.update(assetDisplayPageEntry);
assetDisplayPageEntry = assetDisplayPageEntryPersistence.update(
assetDisplayPageEntry);

LayoutPageTemplateEntry layoutPageTemplateEntry =
_layoutPageTemplateEntryLocalService.fetchLayoutPageTemplateEntry(
layoutPageTemplateEntryId);

if (layoutPageTemplateEntry != null) {
layoutPageTemplateEntry.setModifiedDate(new Date());

_layoutPageTemplateEntryLocalService.updateLayoutPageTemplateEntry(
layoutPageTemplateEntry);
}

return assetDisplayPageEntry;
}

private long _getPlid(
Expand Down

This file was deleted.

0 comments on commit 6cb0893

Please sign in to comment.