Ejemplo n.º 1
0
def create_sku_product_type_mapping(product_type):
    try:
        sp = SkuTypeProductTypeMapping.objects.get(account='nuezone',
                                                   sku_type=product_type.type,
                                                   product_type=product_type)
    except SkuTypeProductTypeMapping.DoesNotExist:
        sp = SkuTypeProductTypeMapping(account='nuezone',
                                       sku_type=product_type.type,
                                       product_type=product_type)
        sp.save()
Ejemplo n.º 2
0
def create_sku_product_type_mapping(product_type):
    try:
        sp = SkuTypeProductTypeMapping.objects.using('default').get(
            account='HomeTown',
            sku_type=product_type.type,
            product_type=product_type)
    except SkuTypeProductTypeMapping.DoesNotExist:
        sp = SkuTypeProductTypeMapping(account='HomeTown',
                                       sku_type=product_type.type,
                                       product_type=product_type)
        sp.save(using='default')
Ejemplo n.º 3
0
def create_sku_product_type_mapping(product_type):
    try:
        sp = SkuTypeProductTypeMapping.objects.using('default').get(account='HomeTown', sku_type = product_type.type, product_type = product_type)
    except SkuTypeProductTypeMapping.DoesNotExist:
        sp = SkuTypeProductTypeMapping(account='HomeTown', sku_type = product_type.type, product_type = product_type)
        sp.save(using='default')
Ejemplo n.º 4
0
def create_sku_product_type_mapping(product_type):
    try:
        sp = SkuTypeProductTypeMapping.objects.get(account='nuezone', sku_type = product_type.type, product_type = product_type)
    except SkuTypeProductTypeMapping.DoesNotExist:
        sp = SkuTypeProductTypeMapping(account='nuezone', sku_type = product_type.type, product_type = product_type)
        sp.save()