-
Notifications
You must be signed in to change notification settings - Fork 8
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
Catch KeyNotFoundError #1045
Catch KeyNotFoundError #1045
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #1045 +/- ##
==========================================
+ Coverage 87.50% 87.75% +0.24%
==========================================
Files 27 27
Lines 2961 2964 +3
==========================================
+ Hits 2591 2601 +10
+ Misses 370 363 -7
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.
Not entirely sure, but I think the logic with the try statements, database actions and mail sending should be refactored slightly.
I need to change the tests. The unit user that's being used does not have a key in the table - that's why the tests are failing. |
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.
Very nice. I like the solution with the goahead
variable!
I don't understand this https://github.com/ScilifelabDataCentre/dds_web/runs/5512442090?check_suite_focus=true#step:3:667 When I run it myself it works. I'm missing something and I'm not going to be able to figure it out today. If anyone else does, let me know. 🙏🏻 |
The unit admin you are trying to invite has the wrong role configured in the JSON: However, I don't understand why the test passed locally then? |
I've added some more tests so if you could have a look again @MatthiasZepper. |
The CLI displays
INTERNAL SERVER ERROR
if a unit user does not have access to a specific project and tries to give another user access. This PR returns the specific errors (should only be one atm) and which projects were affected.To test:
Needs to be used with ScilifelabDataCentre/dds_cli#379, otherwise it will just say that all is well every time.
dev
branch