Cabinetes_update alpha v0.935
This commit is contained in:
Binary file not shown.
@@ -1888,7 +1888,17 @@ def computers():
|
||||
c.note, c.date_in_operation, c.date_added
|
||||
FROM computers c
|
||||
LEFT JOIN cabinets cab ON cab.id = c.cabinet_id
|
||||
ORDER BY c.date_added DESC, c.id DESC
|
||||
ORDER BY
|
||||
cab.building NULLS LAST,
|
||||
CASE
|
||||
WHEN NULLIF(REGEXP_REPLACE(COALESCE(cab.cabinet, cab.name, ''), '\\D', '', 'g'), '') IS NULL THEN 1
|
||||
ELSE 0
|
||||
END,
|
||||
COALESCE(NULLIF(REGEXP_REPLACE(COALESCE(cab.cabinet, cab.name, ''), '\\D', '', 'g'), ''), '0')::INT,
|
||||
cab.cabinet NULLS LAST,
|
||||
cab.name NULLS LAST,
|
||||
c.inventory_number,
|
||||
c.id
|
||||
"""
|
||||
)
|
||||
rows = cur.fetchall()
|
||||
|
||||
Reference in New Issue
Block a user