예제 #1
0
def delete_sizenormalization(model_id, sizenormalization_id):
    try:
        model = g.uow.size_normalizations.get_by_id(sizenormalization_id)

        delete_thread = DeleteNormalizationThread('size', model)
        delete_thread.start()

        return jsonify({"Success": "true"})
    except:
        print "Error: ", sys.exc_info()[0]
        response = jsonify({"Success": "false"})
        response.status_code = 500
        return response
예제 #2
0
def delete_pricenormalization(model_id, pricenormalization_id):
    try:
        model = g.uow.price_normalizations.get_by_id(pricenormalization_id)

        # handle deletion of normalization in another thread
        delete_thread = DeleteNormalizationThread('price', model)
        delete_thread.start()

        return jsonify({"Success": "true"})
    except:
        print "Error: ", sys.exc_info()[0]
        response = jsonify({"Success": "false"})
        response.status_code = 500
        return response