liquid_feedback_frontend

diff model/snapshot.lua @ 1629:c5c18a861b85

Fixed display of last counting
author bsw
date Mon Feb 08 01:39:43 2021 +0100 (2021-02-08)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/model/snapshot.lua	Mon Feb 08 01:39:43 2021 +0100
     1.3 @@ -0,0 +1,12 @@
     1.4 +Snapshot = mondelefant.new_class()
     1.5 +Snapshot.table = 'snapshot'
     1.6 +Snapshot.primary_key = "id"
     1.7 +
     1.8 +function Snapshot:latest_by_issue_id(issue_id)
     1.9 +  return self:new_selector()
    1.10 +    :add_where{ "issue_id = ?", issue_id }
    1.11 +    :add_order_by("id DESC")
    1.12 +    :limit(1)
    1.13 +    :optional_object_mode()
    1.14 +    :exec()
    1.15 +end

Impressum / About Us