liquid_feedback_frontend
diff app/main/issue/show.lua @ 1629:c5c18a861b85
Fixed display of last counting
| author | bsw |
|---|---|
| date | Mon Feb 08 01:39:43 2021 +0100 (2021-02-08) |
| parents | e7a0f1235ac0 |
| children |
line diff
1.1 --- a/app/main/issue/show.lua Mon Feb 08 01:05:04 2021 +0100 1.2 +++ b/app/main/issue/show.lua Mon Feb 08 01:39:43 2021 +0100 1.3 @@ -51,8 +51,9 @@ 1.4 readonly = true, 1.5 attr = { class = "sectionRow form" }, 1.6 content = function() 1.7 - if issue.snapshot then 1.8 - ui.field.timestamp{ label = _"Last counting:", value = issue.snapshot } 1.9 + local latest_snapshot = Snapshot:latest_by_issue_id(issue.id) 1.10 + if latest_snapshot then 1.11 + ui.field.timestamp{ label = _"Last counting:", value = latest_snapshot.calculated } 1.12 end 1.13 ui.field.text{ label = _"Population", name = "population" } 1.14 ui.field.timestamp{ label = _"Created at", name = "created" }