🎨(backend) simplify boolean comparisons by using opposite operators
Replace inverted boolean comparisons (not ... ==) with direct opposite operators (!=) to improve code readability and reduce unnecessary complexity in conditional statements.
This commit is contained in:
committed by
aleb_the_flash
parent
5ef38fcba6
commit
3e315e92fa
@@ -42,7 +42,7 @@ class ResourceAccessSerializerMixin:
|
||||
data.get("role") == models.RoleChoices.OWNER
|
||||
and not self.instance.resource.is_owner(user)
|
||||
or self.instance.role == models.RoleChoices.OWNER
|
||||
and not self.instance.user == user
|
||||
and self.instance.user != user
|
||||
)
|
||||
) or (
|
||||
# Create
|
||||
|
||||
Reference in New Issue
Block a user