Closed egisxxegis closed 1 year ago
Thanks Miksus :)
No problem! I really appreciate your effort :)
Especially the other bug you reported was a saviour. I was about to release quite a buggy feature (though the release will go till tomorrow or the day after).
Describe the bug When using Rocketry with FastAPI, I return all tasks using such code: return
rocketry_app.session.tasks
. But if I dynamically create task (rocketry_app.session.create_task(...)
) and set itsstart_cond
toconds.cron(...)
, then endpoint raises exception on returning tasks:AttributeError: Condition <class 'rocketry.conditions.task.task.TaskRunnable'> is missing __str__.
To Reproduce Create task in session, set its start cond to future date using conds.cron(...), return session.tasks via FastAPI endpoint (found reference example in Rocketry docs)
Expected behavior No 500 internal error (no AttributeError) I expect it to print something, to stringify the condition
Screenshots I am sorry, no screenshots.
Desktop (please complete the following information):
Additional context I am creating a pull request to fix this issue. Link: pull request