Skip to content

[9.x] Return model when casting attribute#45539

Merged
taylorotwell merged 1 commit into9.xfrom
fix-attribute-return
Jan 6, 2023
Merged

[9.x] Return model when casting attribute#45539
taylorotwell merged 1 commit into9.xfrom
fix-attribute-return

Conversation

@driesvints
Copy link
Member

@driesvints driesvints commented Jan 6, 2023

Right now, when setting an attribute directly through setAttribute that has an Attribute cast, it won't return anything while the behavior of all the other calls to setAttribute is to return the model. Given that the return of setAttributeMarkedMutatedAttributeValue is mixed but nothing was returned, it seems to me that this was forgotten.

setMutatedAttributeValue also doesn't explicitly returns the model but people can decide for themselves to do that or not in the mutator.

Fixes #45537

@driesvints driesvints changed the title Return model when casting attribute [9.x] Return model when casting attribute Jan 6, 2023
@taylorotwell taylorotwell merged commit 8c9ae32 into 9.x Jan 6, 2023
@taylorotwell taylorotwell deleted the fix-attribute-return branch January 6, 2023 14:20
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.

Inconsistent behavior with setAttribute() and custom mutators

2 participants