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

Calling multiple saves of the model on same request raises Exception #82

Open
tsdogs opened this issue Jul 16, 2020 · 0 comments
Open

Comments

@tsdogs
Copy link

tsdogs commented Jul 16, 2020

When you call $model->save() multiple times on the same action/request it raises an exception with file upload failed.

I encounter this because I have a complex form which handles main model and submodels.
To save the submodules I need to generate the first model key so I initially save the model in a state where it's incomplete to get the primary key.
Then save the submodels, and then change the state of the master model to complete (this triggers an event to notify the user).

On the second save the FileBehaviour raises an exception 'cause it cannot find the temporary file which was handled on the first call.

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

No branches or pull requests

1 participant