Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions back/boxtribute_server/business_logic/statistics/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@
h.id AS id
FROM history h
JOIN ValidBoxes s ON h.record_id = s.id
AND ((h.to_int IS NOT null AND h.id >= %s)
OR h.changes = "Record created"
OR h.changes = "Record deleted"
OR h.changes = "Box was undeleted."
AND (
h.id >= %s
AND (
h.to_int IS NOT NULL
OR h.changes IN ("Record created", "Record deleted", "Box was undeleted.")
)
)
AND h.tablename = 'stock'
ORDER BY record_id, changedate DESC, id DESC
),
Expand Down
Loading