Skip to content

Commit

Permalink
Use createSnapshot() in publish handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Carlino committed Apr 19, 2021
1 parent 877bbbd commit f60c269
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Handler/Form/PublishHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ protected function createSnapshot(EventContextInterface $context): ?Snapshot
if ($record === null || !$record->hasExtension(Versioned::class)) {
return null;
}
$snapshot = Snapshot::create();
$snapshot->applyOrigin($record);
$snapshot->addOwnershipChain($record);
$snapshot = Snapshot::singleton()->createSnapshot($record);

// Get the most recent change set to find out what was published
$changeSet = ChangeSet::get()->filter([
Expand Down

0 comments on commit f60c269

Please sign in to comment.