| Line 97... |
Line 97... |
| 97 |
app_offer.appmaster_id = appMasterId
|
97 |
app_offer.appmaster_id = appMasterId
|
| 98 |
app_offer.offer_active = True
|
98 |
app_offer.offer_active = True
|
| 99 |
locations = str(offer.get('location')).split(',')
|
99 |
locations = str(offer.get('location')).split(',')
|
| 100 |
app_offer.location = ''
|
100 |
app_offer.location = ''
|
| 101 |
for location in locations:
|
101 |
for location in locations:
|
| - |
|
102 |
if app_offer.location =='':
|
| - |
|
103 |
app_offer.location = location
|
| - |
|
104 |
else:
|
| 102 |
app_offer.location = app_offer.location +', '+ location
|
105 |
app_offer.location = app_offer.location +', '+ location
|
| 103 |
existingAppOffer = app_offers.query.filter(app_offers.affiliate_id==AFFILIATE_ID).filter(app_offers.package_name==offer['packageName']).filter(app_offers.show==True).first()
|
106 |
existingAppOffer = app_offers.query.filter(app_offers.affiliate_id==AFFILIATE_ID).filter(app_offers.package_name==offer['packageName']).filter(app_offers.show==True).first()
|
| 104 |
|
107 |
|
| 105 |
if existingAppOffer is None:
|
108 |
if existingAppOffer is None:
|
| 106 |
app_offer.show = True
|
109 |
app_offer.show = True
|
| 107 |
else:
|
110 |
else:
|
| Line 138... |
Line 141... |
| 138 |
app_offer.image_url = offer.get('iconUrl')
|
141 |
app_offer.image_url = offer.get('iconUrl')
|
| 139 |
app_offer.offer_active = True
|
142 |
app_offer.offer_active = True
|
| 140 |
locations = str(offer.get('location')).split(',')
|
143 |
locations = str(offer.get('location')).split(',')
|
| 141 |
app_offer.location = ''
|
144 |
app_offer.location = ''
|
| 142 |
for location in locations:
|
145 |
for location in locations:
|
| - |
|
146 |
if app_offer.location =='':
|
| - |
|
147 |
app_offer.location = location
|
| - |
|
148 |
else:
|
| 143 |
app_offer.location = app_offer.location +', '+ location
|
149 |
app_offer.location = app_offer.location +', '+ location
|
| 144 |
existingAppOffer = app_offers.query.filter(app_offers.affiliate_id==AFFILIATE_ID).filter(app_offers.package_name==offer['packageName']).filter(app_offers.show==True).first()
|
150 |
existingAppOffer = app_offers.query.filter(app_offers.affiliate_id==AFFILIATE_ID).filter(app_offers.package_name==offer['packageName']).filter(app_offers.show==True).first()
|
| 145 |
if existingAppOffer is None:
|
151 |
if existingAppOffer is None:
|
| 146 |
app_offer.show = True
|
152 |
app_offer.show = True
|
| 147 |
else:
|
153 |
else:
|
| 148 |
if existingAppOffer.affiliate_offer_id not in ACTIVE_OFFERS:
|
154 |
if existingAppOffer.affiliate_offer_id not in ACTIVE_OFFERS:
|