mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[FIX] runbot: fix crash when forcing a batch
Fixes a crash when creating a new batch on a bundle who's last batch is still preparing, instead the preparing batch will be processed directly.
This commit is contained in:
parent
669f2be60c
commit
4c3baf83ed
@ -230,7 +230,7 @@ class Runbot(Controller):
|
||||
if not request.env.user.has_group('runbot.group_runbot_advanced_user') and ':' not in bundle.name:
|
||||
raise Forbidden("Only users with a specific group can do that. Please contact runbot administrators")
|
||||
_logger.info('user %s forcing bundle %s', request.env.user.name, bundle.name) # user must be able to read bundle
|
||||
batch = bundle.sudo()._force()
|
||||
batch = bundle.sudo()._force() or bundle.sudo().last_batch
|
||||
batch._log('Batch forced by %s', request.env.user.name)
|
||||
batch._prepare(auto_rebase=bool(auto_rebase), use_base_commits=bool(use_base_commits))
|
||||
batch._process()
|
||||
|
Loading…
Reference in New Issue
Block a user