| Line 31... |
Line 31... |
| 31 |
app_master = appmasters.get_by(package_name=offer['package_name'])
|
31 |
app_master = appmasters.get_by(package_name=offer['package_name'])
|
| 32 |
if app_master is None:
|
32 |
if app_master is None:
|
| 33 |
app_master = appmasters()
|
33 |
app_master = appmasters()
|
| 34 |
app_master.app_name = offer.get('appName')
|
34 |
app_master.app_name = offer.get('appName')
|
| 35 |
app_master.package_name = offer.get('packageName')
|
35 |
app_master.package_name = offer.get('packageName')
|
| - |
|
36 |
app_master.os_name = 'ANDROID'
|
| 36 |
session.commit()
|
37 |
session.commit()
|
| 37 |
appMasterId = app_master.id
|
38 |
appMasterId = app_master.id
|
| 38 |
single_app_offers = app_offers.query.filter(app_offers.affiliate_id==AFFILIATE_ID).filter(app_offers.package_name==offer['package_name']).all()
|
39 |
single_app_offers = app_offers.query.filter(app_offers.affiliate_id==AFFILIATE_ID).filter(app_offers.package_name==offer['package_name']).all()
|
| 39 |
ACTIVE_OFFERS.append(offer['offerId'])
|
40 |
ACTIVE_OFFERS.append(offer['offerId'])
|
| 40 |
for app_offer in single_app_offers:
|
41 |
for app_offer in single_app_offers:
|