| Line 41... |
Line 41... |
| 41 |
app_offer.user_payout = .8 * app_offer.offer_price
|
41 |
app_offer.user_payout = .8 * app_offer.offer_price
|
| 42 |
app_offer.override_payout = False
|
42 |
app_offer.override_payout = False
|
| 43 |
app_offer.overriden_payout = 0.0
|
43 |
app_offer.overriden_payout = 0.0
|
| 44 |
app_offer.app_name = offer.get('appName')
|
44 |
app_offer.app_name = offer.get('appName')
|
| 45 |
app_offer.package_name = offer.get('packageName')
|
45 |
app_offer.package_name = offer.get('packageName')
|
| 46 |
app_offer.image_url = ""
|
- |
|
| 47 |
app_offer.description = input_json.get('description')
|
46 |
app_offer.description = input_json.get('description')
|
| 48 |
app_offer.shortDescription = offer.get('shortDesc')
|
47 |
app_offer.shortDescription = offer.get('shortDesc')
|
| 49 |
app_offer.longDescription = offer.get('longDesc')
|
48 |
app_offer.longDescription = offer.get('longDesc')
|
| 50 |
app_offer.link = ""
|
49 |
app_offer.link = ""
|
| 51 |
app_offer.offer_active = True
|
50 |
app_offer.offer_active = True
|
| 52 |
app_offer.priority = 0
|
51 |
app_offer.priority = 0
|
| 53 |
app_offer.show = False
|
52 |
app_offer.show = False
|
| 54 |
app_offer.offerCategory = offer.get('offerCategory')
|
53 |
app_offer.offerCategory = offer.get('offerCategory')
|
| 55 |
app_offer.promoImage = input_json.get('promoImage')
|
54 |
app_offer.promoImage = input_json.get('promoImage')
|
| - |
|
55 |
app_offer.ratings = offer.get('appRating')
|
| - |
|
56 |
app_offer.downloads = offer.get('appDownloads')
|
| - |
|
57 |
app_offer.image_url = offer.get('iconUrl')
|
| 56 |
else:
|
58 |
else:
|
| 57 |
try:
|
59 |
try:
|
| 58 |
app_offer.offer_price = float(offer['offerPrice'])
|
60 |
app_offer.offer_price = float(offer['offerPrice'])
|
| 59 |
except:
|
61 |
except:
|
| 60 |
app_offer.offer_price = 0.0
|
62 |
app_offer.offer_price = 0.0
|
| 61 |
app_offer.user_payout = .8 * app_offer.offer_price
|
63 |
app_offer.user_payout = .8 * app_offer.offer_price
|
| 62 |
app_offer.image_url = ""
|
- |
|
| 63 |
app_offer.description = input_json.get('description')
|
64 |
app_offer.description = input_json.get('description')
|
| 64 |
app_offer.shortDescription = offer.get('shortDesc')
|
65 |
app_offer.shortDescription = offer.get('shortDesc')
|
| 65 |
app_offer.longDescription = offer.get('longDesc')
|
66 |
app_offer.longDescription = offer.get('longDesc')
|
| 66 |
app_offer.link = ""
|
67 |
app_offer.link = ""
|
| 67 |
app_offer.offerCategory = offer.get('offerCategory')
|
68 |
app_offer.offerCategory = offer.get('offerCategory')
|
| 68 |
app_offer.promoImage = input_json.get('promoImage')
|
69 |
app_offer.promoImage = input_json.get('promoImage')
|
| - |
|
70 |
app_offer.ratings = offer.get('appRating')
|
| - |
|
71 |
app_offer.downloads = offer.get('appDownloads')
|
| - |
|
72 |
app_offer.image_url = offer.get('iconUrl')
|
| 69 |
session.commit()
|
73 |
session.commit()
|
| 70 |
|
74 |
|
| 71 |
def markOfferAsInactive():
|
75 |
def markOfferAsInactive():
|
| 72 |
all_active_offers = app_offers.query.filter(app_offers.affiliate_id==AFFILIATE_ID).filter(~app_offers.affiliate_offer_id.in_(ACTIVE_OFFERS)).filter(app_offers.offer_active==True).all()
|
76 |
all_active_offers = app_offers.query.filter(app_offers.affiliate_id==AFFILIATE_ID).filter(~app_offers.affiliate_offer_id.in_(ACTIVE_OFFERS)).filter(app_offers.offer_active==True).all()
|
| 73 |
for active_offer in all_active_offers:
|
77 |
for active_offer in all_active_offers:
|