-
Notifications
You must be signed in to change notification settings - Fork 200
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: Initialising a Node with a User #4977
Conversation
So it appears that no one has ever tried to specifically set a user for a node because, as you see from the diff, it would then try to call `.backend_entity` on the backend entity and fail. Disappointing that mypy didn't pick this up in the type checking (perhaps there is a stricter setting that I haven't added)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @chrisjsewell . Straight forward enough, but since this wasn't caught by tests and is so basic, would be good to add a simple test for this.
yeh yeh I knew you were going to say this 😛 Just wanted to quickly add the code change via github first, so I didn't forget |
@sphuber I converted all of |
Codecov Report
@@ Coverage Diff @@
## develop #4977 +/- ##
===========================================
+ Coverage 80.11% 80.12% +0.01%
===========================================
Files 515 515
Lines 36673 36676 +3
===========================================
+ Hits 29378 29382 +4
+ Misses 7295 7294 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @chrisjsewell
So it appears that no one has ever tried to specifically set a user for a node (e.g.
Data(user=another_user)
) because, as you see from the diff, it would then try to call.backend_entity
on the backend entity and fail.Disappointing that mypy didn't pick this up in the type checking (perhaps there is a stricter setting that I haven't added)
cc @ltalirz as this came up with respect to the REST API (i.e. if we want to create a node for a specific user)