def get(self, request, *args, **kwargs): token = self.request.COOKIES.get('user_token') self.hub = AuthServiceApi.get_hub(self.kwargs.get('dest_hub')) self.devices = InternalApi.get_devices(token, self.hub) return super(ConnectUnitDeviceSelectView, self).get(request, *args, **kwargs)
def get(self, request, *args, **kwargs): hub = AuthServiceApi.get_hub(int(kwargs.get('hub'))) self.hub = hub self.devices = InternalApi.get_devices( self.request.COOKIES.get('user_token'), hub) return super(HubDeviceView, self).get(request, *args, **kwargs)