Browse Source

Divide by 0 fix on Landing Pages

master
GJWilliams87 4 years ago
parent
commit
d5c887fb60
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      UnivateProperties_API/Repository/Campaigns/CampaignRepository.cs

+ 2
- 0
UnivateProperties_API/Repository/Campaigns/CampaignRepository.cs View File

@@ -46,6 +46,8 @@ namespace UnivateProperties_API.Repository.Campaigns
46 46
 
47 47
             string tableItems = "<table align=center>";
48 48
             int rows;
49
+            if (campaign.ItemsPerRow == 0)
50
+                campaign.ItemsPerRow = 1;
49 51
             if (campaign.Items.Count % campaign.ItemsPerRow == 0)
50 52
             {
51 53
                 rows = campaign.Items.Count / campaign.ItemsPerRow;

Loading…
Cancel
Save