Skip to content

Commit

Permalink
Don't save non-revisable fields
Browse files Browse the repository at this point in the history
  • Loading branch information
edalzell authored Jan 2, 2025
1 parent 078714a commit 9854fb2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Traits/HasRunwayResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ protected function revisionKey(): string
protected function revisionAttributes(): array
{
$data = $this->runwayResource()->blueprint()->fields()->setParent($this)->all()
->filter(fn (Field $field) => $field->isRevisable())
->reject(fn (Field $field) => $field->fieldtype() instanceof Section)
->reject(fn (Field $field) => $field->visibility() === 'computed')
->reject(fn (Field $field) => $field->get('save', true) === false)
Expand Down

0 comments on commit 9854fb2

Please sign in to comment.