perf: reslove conflict

pull/9075/head
ibuler 2 years ago
parent 7f0744961d
commit ed26c7f575

@ -1,12 +1,7 @@
from django.shortcuts import get_object_or_404
from rest_framework.generics import ListAPIView, get_object_or_404
<<<<<<< HEAD
from common.utils import get_logger, lazyproperty
=======
from common.exceptions import JMSObjectDoesNotExist
from common.utils import get_logger, lazyproperty, is_uuid
>>>>>>> 0d3c5dddf9c838c5dcd28c20b6a8498088e45ce2
from common.utils import get_logger
from perms import serializers
from perms.hands import Asset
from perms.utils import PermAccountUtil
@ -26,21 +21,6 @@ class UserGrantedAssetAccountsApi(SelfOrPKUserMixin, ListAPIView):
('list', 'perms.view_userassets'),
)
@lazyproperty
<<<<<<< HEAD
=======
def user(self) -> User:
query_user = self.kwargs.get('user')
if is_uuid(query_user):
user = User.objects.get(id=query_user)
elif query_user == 'my':
user = self.request.user
else:
raise JMSObjectDoesNotExist(object_name=_('User'))
return user
@lazyproperty
>>>>>>> 0d3c5dddf9c838c5dcd28c20b6a8498088e45ce2
def asset(self):
asset_id = self.kwargs.get('asset_id')
kwargs = {'id': asset_id, 'is_active': True}

@ -68,7 +68,6 @@ class SelfOrPKUserMixin:
return self.admin_rbac_perms
def request_user_is_self(self):
print("user is: ", self.kwargs)
return self.kwargs.get('user') in ['my', 'self']
@property

Loading…
Cancel
Save