Skip to content

Commit

Permalink
The id was not being generated when following the new static factory …
Browse files Browse the repository at this point in the history
…method. This led to a database exception.
  • Loading branch information
carlsixsmith-moj committed Jun 27, 2024
1 parent 85ae720 commit c1f89e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Domain/Entities/Documents/Document.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ namespace Cfo.Cats.Domain.Entities.Documents;

public class Document : OwnerPropertyEntity<Guid>, IMayHaveTenant, IAuditTrial
{

private Document()
{
Id = Guid.NewGuid();

}

private Document(string title, string description, DocumentType documentType)
{
Id = Guid.NewGuid();
Title = title;
IsPublic = false;
Description = description;
Expand Down

0 comments on commit c1f89e6

Please sign in to comment.