Skip to content
Snippets Groups Projects
Commit 3c9e8e5b authored by kaiyou's avatar kaiyou
Browse files

Fix the tasks loop

parent 478f8fe6
No related branches found
No related tags found
No related merge requests found
Pipeline #2907 passed
......@@ -237,13 +237,13 @@ class Profile(db.Model):
@classmethod
def transition_ready(cls):
return cls.query.filter(
cls.transition_step.in_ ([cls.START, cls.DONE]) or
(
cls.transition_step == cls.INIT and
return cls.query.filter(sqlalchemy.or_(
cls.transition_step.in_ ([cls.START, cls.DONE]),
sqlalchemy.and_(
cls.transition_step == cls.INIT,
datetime.datetime.now() > cls.transition_time
)
)
))
def transitions(self, actor):
return {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment