Source code for shuup.core.suppliers.strategies

# -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2021, Shuup Commerce Inc. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.


[docs]class FirstSupplierStrategy(object):
[docs] def get_supplier(self, **kwargs): shop_product = kwargs["shop_product"] return shop_product.suppliers.enabled(shop=shop_product.shop).first()