Skip to content

Commit fc5f765

Browse files
committed
Fix calculation for total pages
1 parent 8b92498 commit fc5f765

File tree

1 file changed

+3
-1
lines changed
  • src/Umbraco.Cms.Integrations.Crm.ActiveCampaign/Models/Dtos

1 file changed

+3
-1
lines changed

src/Umbraco.Cms.Integrations.Crm.ActiveCampaign/Models/Dtos/MetaDto.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ public class MetaDto
88
public string Total { get; set; }
99

1010
[JsonPropertyName("totalPages")]
11-
public int TotalPages => int.TryParse(Total, out var total) ? total / Constants.DefaultPageSize : 0;
11+
public int TotalPages => int.TryParse(Total, out var total)
12+
? (int)Math.Ceiling((double)total / Constants.DefaultPageSize)
13+
: 0;
1214
}
1315
}

0 commit comments

Comments
 (0)