u.username = un
u.links = rec['links']
u.start = rec['start']
+ u.end = rec.get('end')
+ u.skip = [(parse(x, default=START) - START).days / 7
+ for x in rec.get('skip', [])]
u.weeks = report.get(un, [])
userlist.append(u)
for u in userlist:
user_start = parse(u.start, default=START)
- if user_start > week_start:
+ if u.end and parse(u.end, default=START) <= week_start:
+ continue
+
+ if week in u.skip:
+ pass
+ elif user_start > week_start:
skip.append(u)
elif len(u.weeks) <= week or not u.weeks[week]:
lame.append(u)