Subversion Repositories SmartDukaan

Rev

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

Rev 16844 Rev 16845
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
            app_offer.location = app_offer.location + location 
102
            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()
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()
104
        
104
        
105
        if existingAppOffer is None:
105
        if existingAppOffer is None:
106
            app_offer.show = True
106
            app_offer.show = True
107
        else:
107
        else:
Line 138... Line 138...
138
        app_offer.image_url = offer.get('iconUrl')
138
        app_offer.image_url = offer.get('iconUrl')
139
        app_offer.offer_active = True
139
        app_offer.offer_active = True
140
        locations = str(offer.get('location')).split(',')
140
        locations = str(offer.get('location')).split(',')
141
        app_offer.location = ''
141
        app_offer.location = ''
142
        for location in locations:
142
        for location in locations:
143
            app_offer.location = app_offer.location + location
143
            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()
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()
145
        if existingAppOffer is None:
145
        if existingAppOffer is None:
146
            app_offer.show = True
146
            app_offer.show = True
147
        else:
147
        else:
148
            if existingAppOffer.affiliate_offer_id not in ACTIVE_OFFERS:
148
            if existingAppOffer.affiliate_offer_id not in ACTIVE_OFFERS: