mirror of
https://github.com/ditkrg/workflower.git
synced 2026-01-22 14:17:11 +00:00
Refactor error logging in manager.rb to always log transition errors if logger is present, simplifying the conditional check.
This commit is contained in:
parent
99752aec39
commit
44018a3016
@ -63,9 +63,8 @@ module Workflower
|
||||
rescue Exception => e
|
||||
# if the log level is set to debug, we want to log the error
|
||||
logger = Workflower.configuration.logger
|
||||
if logger.present? && logger.level == Logger::DEBUG
|
||||
logger.debug("Error during transition: #{e.message}")
|
||||
end
|
||||
logger.debug("Error during transition: #{e.message}") if logger.present?
|
||||
|
||||
@calling_model.errors.add(@calling_model.workflower_state_column_name, :transition_faild)
|
||||
false
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user