Manos Chorianopoulos

dinning campaign issue fix

......@@ -289,7 +289,7 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{
} else if (campaigns[indexPath.row]._campaign_type == "coupon") {
let couponsetUuid = campaigns[indexPath.row]._couponset
if (couponsetUuid != "") {
if (couponsetUuid != "" && couponsetUuid != nil) {
let couponsetsList = swiftApi().getCouponSetList()
for item in couponsetsList {
......
......@@ -325,10 +325,10 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{
}
}
} else if (campaign._campaign_type == "coupon" && campaign._couponset != "") {
} else if (campaign._campaign_type == "coupon" && campaign._couponset != "" && campaign._couponset != nil) {
let couponsetUuid = campaign._couponset
if (couponsetUuid != "") {
if (couponsetUuid != "" && couponsetUuid != nil) {
let couponsetsList = swiftApi().getCouponSetList()
for item in couponsetsList {
......
......@@ -4836,7 +4836,7 @@ public class swiftApi {
if (campaign._campaign_type == "coupon") {
let couponsetUuid = campaign._couponset
if (couponsetUuid != "") {
if (couponsetUuid != "" && couponsetUuid != nil) {
let couponsetsList = swiftApi().getCouponSetList()
for item in couponsetsList {
......@@ -6863,10 +6863,10 @@ public class swiftApi {
public func handleLoyaltyCampaigns(_ campaign: CampaignItemModel, _ controller: UIViewController) -> Void {
if (campaign._campaign_type == "coupon" && campaign._couponset != "") {
if (campaign._campaign_type == "coupon" && campaign._couponset != "" && campaign._couponset != nil) {
let couponsetUuid = campaign._couponset
if (couponsetUuid != "") {
if (couponsetUuid != "" && couponsetUuid != nil) {
let couponsetsList = swiftApi().getCouponSetList()
for item in couponsetsList {
......