diff --git a/src/RawRabbit.Operations.StateMachine/StateMachineBase.cs b/src/RawRabbit.Operations.StateMachine/StateMachineBase.cs index fda8355c..9b95a18d 100644 --- a/src/RawRabbit.Operations.StateMachine/StateMachineBase.cs +++ b/src/RawRabbit.Operations.StateMachine/StateMachineBase.cs @@ -18,7 +18,7 @@ public abstract class StateMachineBase : StateMachineB protected StateMachineBase(TModel model = null) { - Model = model?.Id == Guid.Empty ? Initialize() : model; + Model = (model == null || model.Id == Guid.Empty) ? Initialize() : model; StateMachine = new StateMachine(() => Model.State, s => Model.State = s); ConfigureState(StateMachine); }