From 494406d504562081588ab0ddde286f32331438db Mon Sep 17 00:00:00 2001 From: Paul de Raaij Date: Wed, 29 Jul 2026 10:41:05 -0400 Subject: [PATCH] feat: add default _ensure_valid_state to Entity base class --- domain/framework/entity.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/domain/framework/entity.py b/domain/framework/entity.py index fa2cb43..99f0ad9 100644 --- a/domain/framework/entity.py +++ b/domain/framework/entity.py @@ -14,5 +14,8 @@ class Entity(ABC): def get_changes(self) -> tuple[DomainEvent, ...]: return self._changes + def _ensure_valid_state(self): + pass + def clear_changes(self) -> Self: return replace(self, _changes=())