Subversion Repositories SmartDukaan

Rev

Rev 16786 | Rev 16845 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16786 Rev 16844
Line 94... Line 94...
94
        app_offer.ratings = offer.get('appRating')
94
        app_offer.ratings = offer.get('appRating')
95
        app_offer.downloads = offer.get('appDownloads')
95
        app_offer.downloads = offer.get('appDownloads')
96
        app_offer.image_url = offer.get('iconUrl')
96
        app_offer.image_url = offer.get('iconUrl')
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(',')
-
 
100
        app_offer.location = ''
-
 
101
        for location in locations:
99
        app_offer.location = offer.get('location')
102
            app_offer.location = app_offer.location + location 
100
        existingAppOffer = app_offers.query.filter(app_offers.affiliate_id==AFFILIATE_ID).filter(app_offers.package_name==offer['packageName']).filter(app_offers.show==True).first()
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()
101
        
104
        
102
        if existingAppOffer is None:
105
        if existingAppOffer is None:
103
            app_offer.show = True
106
            app_offer.show = True
104
        else:
107
        else:
Line 132... Line 135...
132
        app_offer.promoImage = input_json.get('promoImage')
135
        app_offer.promoImage = input_json.get('promoImage')
133
        app_offer.ratings = offer.get('appRating')
136
        app_offer.ratings = offer.get('appRating')
134
        app_offer.downloads = offer.get('appDownloads')
137
        app_offer.downloads = offer.get('appDownloads')
135
        app_offer.image_url = offer.get('iconUrl')
138
        app_offer.image_url = offer.get('iconUrl')
136
        app_offer.offer_active = True
139
        app_offer.offer_active = True
-
 
140
        locations = str(offer.get('location')).split(',')
-
 
141
        app_offer.location = ''
-
 
142
        for location in locations:
137
        app_offer.location = offer.get('location')
143
            app_offer.location = app_offer.location + location
138
        existingAppOffer = app_offers.query.filter(app_offers.affiliate_id==AFFILIATE_ID).filter(app_offers.package_name==offer['packageName']).filter(app_offers.show==True).first()
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()
139
        if existingAppOffer is None:
145
        if existingAppOffer is None:
140
            app_offer.show = True
146
            app_offer.show = True
141
        else:
147
        else:
142
            if existingAppOffer.affiliate_offer_id not in ACTIVE_OFFERS:
148
            if existingAppOffer.affiliate_offer_id not in ACTIVE_OFFERS: