Skip to content

Commit

Permalink
fix: broken tre (#762)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaybeeelsdon authored Jul 25, 2024
1 parent 260185e commit 90248c0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/BL/Models/SubmissionGetProjectModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,18 @@ public TreGetProjectModel(Tre Tre, int ProjectId, bool DoProjectTreDecision = tr
{
Id = Tre.Id;
Name = Tre.Name;

if (DoProjectTreDecision)
{
ProjectTreDecision = new TreDecisionsGetProjectModel();
ProjectTreDecision.Decision = Tre.ProjectTreDecisions.Where(x => x.SubmissionProj.Id == ProjectId).OrderByDescending(x => x.Id).FirstOrDefault().Decision;
var localdec = Tre.ProjectTreDecisions
.Where(x => x.SubmissionProj != null && x.SubmissionProj.Id == ProjectId).MaxBy(x => x.Id);
if (localdec != null)
{
Decision decision = localdec.Decision;
ProjectTreDecision.Decision = decision;
}

}

}
Expand Down

0 comments on commit 90248c0

Please sign in to comment.