-
Notifications
You must be signed in to change notification settings - Fork 906
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
[Bug] Deleting last relation tries to update this record and throws an error #4204
Comments
@howest-ward I think I am fixing this. Just pushed the branch to github! #4205 Can you see if it's the same thing ? Thanks, |
I am not sure how to test a pull request locally, but it looks the same problem. I use composer to install backpack, can I test pull requests on this code? |
Hey @howest-ward ! Fastest way is to change your The rule is: prefix the branch name with In this case, since this PR is very recent it has the last code available in v5 plus the fix. you can use it until we merge the branch, when we do you just need to revert the composer.json back to initial state to pick v5 source branch. Hope it helps 👍 Cheers, Pedro |
Thanks, learned something today! |
Going to close, let's keep the conversation in the PR thread if needed! Thanks again @howest-ward |
Bug report
What I did
I added a relationship with multiple fields. I can add multiple relationship records.
When I delete a relationship record it works exept when I try to delete the last record.
Then it tries to update this record with an empty parent Id, and thus throwing an error "Cannot insert the value NULL into column ..."
What I expected to happen
Delete the record and not update with emtpy parent ID
Is it a bug in the latest version of Backpack?
Yes
Backpack, Laravel, PHP, DB version
When I run
php artisan backpack:version
the output is:PHP VERSION:
PHP 7.4.21 (cli) (built: Jul 1 2021 16:09:23) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.21, Copyright (c), by Zend Technologies
LARAVEL VERSION:
v8.83.1@bddba117f8bce2f3c9875ca1ca375a96350d0f4d
BACKPACK VERSION:
5.0.6@2be4ff8407259f528a3541f0569ce156bab63165
The text was updated successfully, but these errors were encountered: