Skip to content

Commit

Permalink
Добавил проверку на null в CreateViews
Browse files Browse the repository at this point in the history
  • Loading branch information
vlastroG committed Jul 12, 2024
1 parent c144980 commit 93cdf29
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/RevitApartmentPlans/Services/ViewPlanCreationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ public ICollection<ViewPlan> CreateViews(
var i = 0;
foreach(var apartment in apartments) {
ct.ThrowIfCancellationRequested();
views.AddRange(CreateViews(apartment, templates, feetOffset));
progress.Report(++i);
var createdViews = CreateViews(apartment, templates, feetOffset);
if(createdViews.Count > 0) {
views.AddRange(createdViews);
}
progress?.Report(++i);
}
t.Commit();
}
Expand Down

0 comments on commit 93cdf29

Please sign in to comment.