diff --git a/call.cgi b/call.cgi index 2751a33..8b8e0d6 100755 --- a/call.cgi +++ b/call.cgi @@ -119,6 +119,28 @@ active = False candidate[-1][2] = date.strftime(datefmt) candidate[-1][1] += "〜"+date.strftime(datefmt) + elif fr < date : # no candidate + to_entry = date.strftime(datefmt) + entry = "?〜" + date.strftime(datefmt) + res = c.execute(query, (id_,)) + dd = res.fetchone() + if dd: + candidate.append( + # 0 1 2 3 4 + [machine, entry, to_entry, action, id_, + # 5 6 + dd[0], dd[1], + # 7 8 + dd[2], dd[3], dd[4]]) + else: + candidate.append( + # 0 1 2 3 4 + [machine, entry, "---", action, id_, + # 5 6 + "????", id_, + # 7 8 + "--", "--", "--"]) + lines.extend(candidate) c.close()