Skip to content

Commit 4a77ff4

Browse files
morhiryanmitchell
andauthored
Fix working copy not deleted on entry publish (#542)
* Fix working copy not deleted on entry publish * fix unrelated failing test --------- Co-authored-by: Ryan Mitchell <ryan@thoughtcollective.com>
1 parent 25a684d commit 4a77ff4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/Revisions/Revision.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,9 @@ public function model($model = null)
7171

7272
return $this;
7373
}
74+
75+
public function toWorkingCopy(): FileEntry
76+
{
77+
return parent::toWorkingCopy()->model($this->model);
78+
}
7479
}

tests/Forms/FormSubmissionTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public function it_should_not_overwrite_submissions()
8484
'data' => [
8585
'name' => 'Billy Doe',
8686
],
87+
'created_at' => now()->addMicrosecond(),
8788
]);
8889

8990
$this->assertCount(2, SubmissionModel::all());

0 commit comments

Comments
 (0)