Example #1
0
def order_scenes(product_list, contact_id):
    chunked_list = chunkify(product_list, 3)
    results = dict()
    results["available"] = [p for p in chunked_list[0]]
    results["ordered"] = [p for p in chunked_list[1]]
    results["invalid"] = [p for p in chunked_list[2]]
    results["lta_order_id"] = "tramorderid1"
    return results
Example #2
0
    def update_scenes(self, order_id, stype, attribute, values):
        scenes = Scene.where({'order_id': order_id, 'sensor_type': stype})
        xscenes = chunkify(scenes, len(values))

        for idx, value in enumerate(values):
            for scene in xscenes[idx]:
                scene.update(attribute, value)
        return True
Example #3
0
    def update_scenes(self, order_id, attribute, values):
        scenes = Scene.where({'order_id': order_id})
        xscenes = chunkify(scenes, len(values))

        for idx, value in enumerate(values):
            for scene in xscenes[idx]:
                scene.update(attribute, value)
        return True
Example #4
0
def order_scenes(product_list, contact_id):
    chunked_list = chunkify(product_list, 3)
    results = dict()
    results["available"] = [p for p in chunked_list[0]]
    results["ordered"] = [p for p in chunked_list[1]]
    results["invalid"] = [p for p in chunked_list[2]]
    results["lta_order_id"] = "tramorderid1"
    return results