github.com/gradientzero/comby-store-postgres
Advanced tools
@@ -28,7 +28,5 @@ package internal | ||
| // serialize event data | ||
| // serialize event data — prefer already-serialized bytes to avoid double serialization | ||
| evtDataBytes := evt.GetDomainEvtBytes() | ||
| // If DomainEvt is set, re-serialize to ensure consistent serialization | ||
| if evt.GetDomainEvt() != nil { | ||
| if len(evtDataBytes) == 0 && evt.GetDomainEvt() != nil { | ||
| if evtDataBytes, err = Serialize(evt.GetDomainEvt()); err != nil { | ||
@@ -95,7 +93,5 @@ return nil, err | ||
| // serialize command data | ||
| // serialize command data — prefer already-serialized bytes to avoid double serialization | ||
| cmdDataBytes := cmd.GetDomainCmdBytes() | ||
| // If DomainCmd is set, re-serialize to ensure consistent serialization | ||
| if cmd.GetDomainCmd() != nil { | ||
| if len(cmdDataBytes) == 0 && cmd.GetDomainCmd() != nil { | ||
| if cmdDataBytes, err = Serialize(cmd.GetDomainCmd()); err != nil { | ||
@@ -102,0 +98,0 @@ return nil, err |