Allow confirm warning and done the production when configuration is user_warning

#044914
This commit is contained in:
Raimon Esteve 2021-06-03 10:36:44 +02:00
parent 358ff66023
commit 6d9b7bd5b7
1 changed files with 6 additions and 6 deletions

View File

@ -316,12 +316,12 @@ class Production(metaclass=PoolMeta):
if pending_operations:
operation, = pending_operations
key ='pending_operation_%d' % operation.id
if (config.check_state_operation == 'user_warning' and
Warning.check(key)):
raise UserWarning(key,
gettext('production_operation.pending_operations',
production=operation.production.rec_name,
operation=operation.rec_name))
if config.check_state_operation == 'user_warning':
if Warning.check(key):
raise UserWarning(key,
gettext('production_operation.pending_operations',
production=operation.production.rec_name,
operation=operation.rec_name))
else:
raise UserError(
gettext('production_operation.pending_operations',