def get_object(self, queryset=None): customer_id = self.kwargs.get('user_id', None) customer = OSFUser.load(customer_id) email = customer.emails.values_list('address', flat=True).first() desk = DeskClient(self.request.user) params = {'email': email} customer = desk.find_customer(params) return customer
def get_object(self, queryset=None): customer_id = self.kwargs.get('user_id', None) customer = OSFUser.load(customer_id) email = customer.emails[0] desk = DeskClient(self.request.user) params = {'email': email} customer = desk.find_customer(params) return customer
def get_object(self, queryset=None): customer_id = self.kwargs.get('user_id', None) customer = User.load(customer_id) email = customer.emails[0] desk = DeskClient(self.request.user) params = {'email': email} customer = desk.find_customer(params) return customer
def get_queryset(self): customer_id = self.kwargs.get('user_id', None) customer = OSFUser.load(customer_id) email = customer.emails.values_list('address', flat=True).first() desk = DeskClient(self.request.user) params = { 'email': email, } queryset = desk.cases(params) return queryset
def get_queryset(self): customer_id = self.kwargs.get('user_id', None) customer = OSFUser.load(customer_id) email = customer.emails[0] desk = DeskClient(self.request.user) params = { 'email': email, } queryset = desk.cases(params) return queryset
def get_queryset(self): customer_id = self.kwargs.get('user_id', None) customer = User.load(customer_id) email = customer.emails[0] desk = DeskClient(self.request.user) params = { 'email': email, } queryset = desk.cases(params) return queryset