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

Fix missing attributes in some events #1934

Merged
merged 4 commits into from Dec 25, 2018

Conversation

1 participant
@ricardograca
Copy link
Member

commented Dec 25, 2018

Introduction

Fixes an issue that prevented all of the attributes that are going to be inserted or updated to be present in the second argument to the event listener of both the creating and updating events.

Motivation

Fixes #1433.

Proposed solution

This simply moves the logic that selects which attributes are going to be saved a bit further up and uses that as the argument to the event handlers, instead of always passing the attrs object.

Also adds another test to verify that save() will use both the attributes passed to it as well as any others that were already set on the model.

ricardograca added some commits Dec 23, 2018

Pass all attributes that will be saved to events
- Fixes an issue where only the attributes passed to the save() call 
would be persent in the second argument of event listeners.

@ricardograca ricardograca added the bug label Dec 25, 2018

@ricardograca ricardograca added this to To do in Version 1.0.0 via automation Dec 25, 2018

@ricardograca ricardograca changed the title Rg event attrs Fix missing attributes in some events Dec 25, 2018

@ricardograca ricardograca merged commit 716f0b6 into master Dec 25, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

Version 1.0.0 automation moved this from To do to Done Dec 25, 2018

@ricardograca ricardograca deleted the rg-event-attrs branch Dec 25, 2018

6utt3rfly added a commit to betastreet/bookshelf-modelbase-plus that referenced this pull request Apr 29, 2019

6utt3rfly added a commit to betastreet/bookshelf-modelbase-plus that referenced this pull request Apr 29, 2019

6utt3rfly added a commit to betastreet/bookshelf-prefixed-ordered-uuid that referenced this pull request Apr 29, 2019

@ricardograca

This comment has been minimized.

Copy link
Member Author

commented Jun 13, 2019

This was released in version 0.15.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.