Skip to content

Commit

Permalink
Regression fix
Browse files Browse the repository at this point in the history
  • Loading branch information
plyhun committed Feb 7, 2024
1 parent 1bf5b17 commit e92f01f
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1517,18 +1517,18 @@ default boolean update(HibProject project, HibNode node, InternalActionContext a
// Update the existing fields
newDraftVersion.updateFieldsFromRest(ac, requestModel.getFields());

// Purge the old draft
if (ac.isPurgeAllowed() && contentDao.isAutoPurgeEnabled( newDraftVersion) && contentDao.isPurgeable(latestDraftVersion)) {
contentDao.purge(latestDraftVersion);
}

// if requested, make the new container the published one
if (requestModel.isPublish()) {
contentDao.setVersion(newDraftVersion, newDraftVersion.getVersion().nextPublished());
setPublished(node, ac, newDraftVersion, branch.getUuid());
batch.add(contentDao.onPublish(newDraftVersion, branch.getUuid()));
}

// Purge the old draft
if (ac.isPurgeAllowed() && contentDao.isAutoPurgeEnabled( newDraftVersion) && contentDao.isPurgeable(latestDraftVersion)) {
contentDao.purge(latestDraftVersion);
}

latestDraftVersion = newDraftVersion;
batch.add(contentDao.onUpdated(newDraftVersion, branch.getUuid(), DRAFT));

Expand Down

0 comments on commit e92f01f

Please sign in to comment.