From 6d9b7bd5b75a88464f8e383dd1d771271bac318a Mon Sep 17 00:00:00 2001 From: Raimon Esteve Date: Thu, 3 Jun 2021 10:36:44 +0200 Subject: [PATCH] Allow confirm warning and done the production when configuration is user_warning #044914 --- operation.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/operation.py b/operation.py index 8220e1d..c54dd71 100644 --- a/operation.py +++ b/operation.py @@ -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',