Exemple #1
0
def _ext():
    document = request.form.get('documentID') or ''
    country = request.form.get('countryID') or ''
    region = request.form.get('regionID') or ''
    if region:
        region = parseServiceId(region)
    user = request.form.get('userName')
    return index_with_logger(COMMUNICATIONS['external'], document, region, country, user)
Exemple #2
0
 def __init__(self, order, columns=None):
     self.order = order
     self.currency = DEFAULT_CURRENCY
     if columns:
         for key in model_price_columns:
             value = columns.get(key)
             if key == "total":
                 value = int(float(value) * 100)
             elif key in ("regionID", "priceTypeID"):
                 value = parseServiceId(value)
             elif key == "countryID":
                 value = value in default_country_types and value or value == n_a and DEFAULT_COUNTRY or value
             setattr(self, key, value)
     self.reg_date = datetime.utcnow()