Subversion Repositories SmartDukaan

Rev

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

Rev 16539 Rev 16540
Line 67... Line 67...
67
        app_offer.offerCategory = offer.get('offerCategory')
67
        app_offer.offerCategory = offer.get('offerCategory')
68
        app_offer.promoImage = input_json.get('promoImage')
68
        app_offer.promoImage = input_json.get('promoImage')
69
    session.commit()
69
    session.commit()
70
        
70
        
71
def markOfferAsInactive():
71
def markOfferAsInactive():
72
    all_active_offers = app_offers.query.filer(app_offers.affiliate_id==AFFILIATE_ID).filter(~app_offers.affiliate_offer_id.in_(ACTIVE_OFFERS)).filter(app_offers.offer_active==True).all()
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()
73
    for active_offer in all_active_offers:
73
    for active_offer in all_active_offers:
74
        active_offer.offer_active = False
74
        active_offer.offer_active = False
75
    session.commit()
75
    session.commit()
76
        
76
        
77
         
77