fix get_all devices
This commit is contained in:
parent
9b701d9804
commit
3c40586807
|
@ -29,7 +29,6 @@ class AllDevicesView(InventaryMixin):
|
||||||
breadcrumb = "Devices / All Devices"
|
breadcrumb = "Devices / All Devices"
|
||||||
|
|
||||||
def get_devices(self, user, offset, limit):
|
def get_devices(self, user, offset, limit):
|
||||||
import pdb; pdb.set_trace()
|
|
||||||
return Device.get_all(self.request.user.institution, offset, limit)
|
return Device.get_all(self.request.user.institution, offset, limit)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -136,6 +136,7 @@ class Device:
|
||||||
self.lots = [
|
self.lots = [
|
||||||
x.lot for x in DeviceLot.objects.filter(device_id=self.id)]
|
x.lot for x in DeviceLot.objects.filter(device_id=self.id)]
|
||||||
|
|
||||||
|
@classmethod
|
||||||
def get_all(cls, institution, offset=0, limit=None):
|
def get_all(cls, institution, offset=0, limit=None):
|
||||||
sql = """
|
sql = """
|
||||||
WITH RankedAnnotations AS (
|
WITH RankedAnnotations AS (
|
||||||
|
|
Loading…
Reference in a new issue