Manos Chorianopoulos

dinning campaign issue fix

...@@ -289,7 +289,7 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{ ...@@ -289,7 +289,7 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{
289 } else if (campaigns[indexPath.row]._campaign_type == "coupon") { 289 } else if (campaigns[indexPath.row]._campaign_type == "coupon") {
290 let couponsetUuid = campaigns[indexPath.row]._couponset 290 let couponsetUuid = campaigns[indexPath.row]._couponset
291 291
292 - if (couponsetUuid != "") { 292 + if (couponsetUuid != "" && couponsetUuid != nil) {
293 let couponsetsList = swiftApi().getCouponSetList() 293 let couponsetsList = swiftApi().getCouponSetList()
294 294
295 for item in couponsetsList { 295 for item in couponsetsList {
......
...@@ -325,10 +325,10 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{ ...@@ -325,10 +325,10 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{
325 } 325 }
326 } 326 }
327 327
328 - } else if (campaign._campaign_type == "coupon" && campaign._couponset != "") { 328 + } else if (campaign._campaign_type == "coupon" && campaign._couponset != "" && campaign._couponset != nil) {
329 let couponsetUuid = campaign._couponset 329 let couponsetUuid = campaign._couponset
330 330
331 - if (couponsetUuid != "") { 331 + if (couponsetUuid != "" && couponsetUuid != nil) {
332 let couponsetsList = swiftApi().getCouponSetList() 332 let couponsetsList = swiftApi().getCouponSetList()
333 333
334 for item in couponsetsList { 334 for item in couponsetsList {
......
...@@ -4836,7 +4836,7 @@ public class swiftApi { ...@@ -4836,7 +4836,7 @@ public class swiftApi {
4836 if (campaign._campaign_type == "coupon") { 4836 if (campaign._campaign_type == "coupon") {
4837 let couponsetUuid = campaign._couponset 4837 let couponsetUuid = campaign._couponset
4838 4838
4839 - if (couponsetUuid != "") { 4839 + if (couponsetUuid != "" && couponsetUuid != nil) {
4840 let couponsetsList = swiftApi().getCouponSetList() 4840 let couponsetsList = swiftApi().getCouponSetList()
4841 4841
4842 for item in couponsetsList { 4842 for item in couponsetsList {
...@@ -6863,10 +6863,10 @@ public class swiftApi { ...@@ -6863,10 +6863,10 @@ public class swiftApi {
6863 6863
6864 6864
6865 public func handleLoyaltyCampaigns(_ campaign: CampaignItemModel, _ controller: UIViewController) -> Void { 6865 public func handleLoyaltyCampaigns(_ campaign: CampaignItemModel, _ controller: UIViewController) -> Void {
6866 - if (campaign._campaign_type == "coupon" && campaign._couponset != "") { 6866 + if (campaign._campaign_type == "coupon" && campaign._couponset != "" && campaign._couponset != nil) {
6867 let couponsetUuid = campaign._couponset 6867 let couponsetUuid = campaign._couponset
6868 6868
6869 - if (couponsetUuid != "") { 6869 + if (couponsetUuid != "" && couponsetUuid != nil) {
6870 let couponsetsList = swiftApi().getCouponSetList() 6870 let couponsetsList = swiftApi().getCouponSetList()
6871 6871
6872 for item in couponsetsList { 6872 for item in couponsetsList {
......