Skip to content

Commit

Permalink
Check for null identifier on add event.
Browse files Browse the repository at this point in the history
  • Loading branch information
micahosborne authored Jul 6, 2023
1 parent eef7b44 commit 136394f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/Marten/Events/Aggregation/TenantSliceGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,20 @@ public void AddEvents<TEvent>(Func<TEvent, IEnumerable<TId>> multipleIdSource, I

public void AddEvent(TId id, IEvent @event)
{
Slices[id].AddEvent(@event);
if (id != null)
{
Slices[id].AddEvent(@event);
}

}

public void AddEvents(TId id, IEnumerable<IEvent> events)
{
Slices[id].AddEvents(events);
}
if (id != null)
{
Slices[id].AddEvents(events);
}
}

public void Dispose()
{
Expand Down

0 comments on commit 136394f

Please sign in to comment.