Fixes from code overview session #5
Loading…
Reference in a new issue
No description provided.
Delete branch "code-review-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A collection of small changes:
@ -23,3 +29,2 @@if permission == Permission::Admin {let is_admin = pm::project_membershipslet row_count = match requested_permission {I like the switch to match here.
@ -39,2 +42,3 @@};Ok(is_member > 0)if row_count > 0 {Do we have a scenario where
row_countcan be greater than 1?I don't think so. There's no constraint in the database to make it so that users are only members of a project once, but I can't imagine why we'd do that on purpose. It could be a good place to put an error log if the row count is over 1, while continuing to work.
I added an error log. Open to changing it, erring on the side of merging.