Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.x] Fix model restoring right after soft deleting it #31719

Merged
merged 2 commits into from
Mar 6, 2020

Conversation

danielsuguimoto
Copy link
Contributor

Relates to #31527

When we soft delete a model it becomes dirty, so if we try to restore it after deletion, the deleted_at column is not cleared. We need to sync the model, setting dirty to false, then the restore works.

@taylorotwell
Copy link
Member

Hey there, could you send this to the 7.x branch? Thanks.

@taylorotwell taylorotwell reopened this Mar 4, 2020
@taylorotwell
Copy link
Member

Nevermind.

@taylorotwell taylorotwell merged commit 898f24e into laravel:6.x Mar 6, 2020
@danielsuguimoto danielsuguimoto deleted the sync-soft-delete branch March 6, 2020 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants