From 35c2c9dba4342692efcb7496fb4231f7bcc668c9 Mon Sep 17 00:00:00 2001 From: Nic Pottier Date: Sat, 19 May 2018 09:48:12 -0500 Subject: [PATCH] archive flow runs based on modified instead of created --- archiver.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archiver.go b/archiver.go index 216f1b0..af71c9d 100644 --- a/archiver.go +++ b/archiver.go @@ -405,8 +405,8 @@ FROM ( JOIN LATERAL (SELECT uuid, name from flows_flow where flows_flow.id = fr.flow_id) as flow_struct ON True JOIN LATERAL (select uuid, name from contacts_contact cc where cc.id = fr.contact_id) as contact_struct ON True - WHERE fr.org_id = $2 AND fr.created_on >= $3 AND fr.created_on < $4 - ORDER BY fr.created_on ASC, id ASC + WHERE fr.org_id = $2 AND fr.modified_on >= $3 AND fr.modified_on < $4 + ORDER BY fr.modified_on ASC, id ASC ) as rec; `