Skip to content

Commit

Permalink
Also update GenerateRecordExtensionClass
Browse files Browse the repository at this point in the history
  • Loading branch information
alnkesq committed Jan 15, 2025
1 parent 980f558 commit e1660c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/FFSourceGen/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -502,11 +502,11 @@ private async Task GenerateRecordExtensionClass(IGrouping<string, ClassGeneratio
var key = item.Properties[i].Key;
if (key == "createdAt")
{
sb.AppendLine($" record.{prop} = {key} ?? DateTime.UtcNow;");
sb.AppendLine($" record.{prop} = {this.PropertyNameToCSharpSafeValue(key)} ?? DateTime.UtcNow;");
}
else
{
sb.AppendLine($" record.{prop} = {key};");
sb.AppendLine($" record.{prop} = {this.PropertyNameToCSharpSafeValue(key)} ;");
}
}

Expand Down

0 comments on commit e1660c5

Please sign in to comment.