Skip to content

Commit

Permalink
no cover
Browse files Browse the repository at this point in the history
  • Loading branch information
gagantrivedi committed Jul 10, 2024
1 parent ebe2dfb commit 3b26f65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/permissions/permission_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,15 @@ def get_object_id_from_base_permission_filter(
list(for_model.objects.filter(group_filter).values_list("id", flat=True))
)
if settings.IS_RBAC_INSTALLED:
# no cover: start
role_filter = get_role_permission_filter(

Check warning on line 248 in api/permissions/permission_service.py

View check run for this annotation

Codecov / codecov/patch

api/permissions/permission_service.py#L248

Added line #L248 was not covered by tests
user, for_model, permission_key, allow_admin, tag_ids
)

# pragma: no cover
object_ids.update(

Check warning on line 252 in api/permissions/permission_service.py

View check run for this annotation

Codecov / codecov/patch

api/permissions/permission_service.py#L252

Added line #L252 was not covered by tests
list(for_model.objects.filter(role_filter).values_list("id", flat=True))
)
# no cover: stop
return object_ids


Expand Down
2 changes: 2 additions & 0 deletions api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ exclude_also = [
'if TYPE_CHECKING:',
'if typing.TYPE_CHECKING:',
'@(abc\\.)?abstractmethod',
"no cover: start(?s:.)*?no cover: stop",

]

[tool.isort]
Expand Down

0 comments on commit 3b26f65

Please sign in to comment.