Skip to content

Commit 03f55ae

Browse files
committed
Merge PR #382 into 14.0
Signed-off-by guewen
2 parents 7b2c768 + 41fe0db commit 03f55ae

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

queue_job_cron/models/ir_cron.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@ class IrCron(models.Model):
1717
comodel_name="queue.job.channel",
1818
compute="_compute_run_as_queue_job",
1919
readonly=False,
20+
store=True,
2021
string="Channel",
2122
)
2223

2324
@api.depends("run_as_queue_job")
2425
def _compute_run_as_queue_job(self):
2526
for cron in self:
26-
if cron.run_as_queue_job and not cron.channel_id:
27+
if cron.channel_id:
28+
continue
29+
if cron.run_as_queue_job:
2730
cron.channel_id = self.env.ref("queue_job_cron.channel_root_ir_cron").id
2831
else:
2932
cron.channel_id = False

0 commit comments

Comments
 (0)