closeio/sync-engine

Some transaction entries are created with created_at in the past

Opened this issue · 0 comments

Further investigation is needed to determine why some created_at values are in the past when records are created in the transaction table. Related code:

if revision_type == "delete":
created_at = getattr(obj, "deleted_at", None)
# Sometimes categories are deleted explicitly which leaves
# their deleted_at default value, EPOCH, when the
# transaction is created.
if created_at == EPOCH:
created_at = func.now()
else:
created_at = getattr(obj, "updated_at", None)