Skip to content

Commit e767fd9

Browse files
author
Sylvester Damgaard
authored
Merge pull request #25 from tv2regionerne/fix/value-reset-publish
Fix values resetting on revision publish
2 parents d3a117b + 6703fcb commit e767fd9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Fieldtypes/Concerns/UsesFields.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,10 @@ protected function getCollections()
236236

237237
// We have to do this because the collection fields value may have changed
238238
// but the parent object has not yet been updated with the new value
239-
if ($post = request()->post()) {
239+
// We only want to do this during save requests, not publish requests, so
240+
// we check for the presence of the _blueprint key as well
241+
$post = request()->post();
242+
if (isset($post['_blueprint'])) {
240243
return data_get($post, $key);
241244
}
242245

0 commit comments

Comments
 (0)