X-Git-Url: https://projects.mako.cc/source/iron-blogger/blobdiff_plain/60b087f32a89cbce36964c846fd5f0ea27f729e3..e1ebd5c9544ef58bb29c9b9e68b469e6b2d3e60f:/render.py diff --git a/render.py b/render.py index 478c44c..dc4ad3d 100755 --- a/render.py +++ b/render.py @@ -40,6 +40,7 @@ def render_template(path, week=None): u.username = un u.links = rec['links'] u.start = rec['start'] + u.end = rec.get('end') u.weeks = report.get(un, []) userlist.append(u) @@ -51,6 +52,9 @@ def render_template(path, week=None): for u in userlist: user_start = parse(u.start, default=START) + if u.end and parse(u.end, default=START) <= week_start: + continue + if user_start > week_start: skip.append(u) elif len(u.weeks) <= week or not u.weeks[week]: