--- a/candolint/models.py Sat Jun 25 18:16:39 2016 +0800
+++ b/candolint/models.py Sat Jun 25 22:11:38 2016 +0800
if seconds or not minutes:
result.append('{} sec'.format(seconds))
+ def get_next_ordinal(cls, project):
+ count = cls.select(pw.fn.COUNT(cls.id)).where(cls.project == project)
--- a/incoming.py Sat Jun 25 18:16:39 2016 +0800
+++ b/incoming.py Sat Jun 25 22:11:38 2016 +0800
- ordinal=Check.select().where(Check.project == project).count() + 1,
+ ordinal=Check.get_next_ordinal(project),
lines=json_encode(result),