Skip to content

Commit

Permalink
Merge pull request RedHatInsights#1123 from Ellen-Yi-Dong/audit_log_c…
Browse files Browse the repository at this point in the history
…reate_role

Import specific management.utils function
  • Loading branch information
astrozzc authored Jun 24, 2024
2 parents 1ca5fdf + 9cf7f7d commit 074eaac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rbac/management/audit_log/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#

"""Model for audit logging."""
import management.utils
from management.utils import get_principal_from_request
from django.db import models
from django.shortcuts import get_object_or_404
from django.utils import timezone
Expand Down Expand Up @@ -97,7 +97,7 @@ def get_resource_item(self, r_type, request, *args, **kwargs):
return None

elif r_type == "principal":
current_user = management.utils.get_principal_from_request(request)
current_user = get_principal_from_request(request)
principal_object = get_object_or_404(Principal, username=current_user.username, tenant=verify_tenant)
return principal_object.id, principal_object.username

Expand Down

0 comments on commit 074eaac

Please sign in to comment.