~homeworkprod/byceps

e242f51fcdcdeaaf9856536f07c7bde02523e814 — Jochen Kupperschmidt a month ago c6b428b
Rename `find_{article,order}_number_sequences_for_shop` to `get_{article,order}_number_sequences_for_shop`
M byceps/blueprints/admin/shop/article/views.py => byceps/blueprints/admin/shop/article/views.py +2 -2
@@ 162,7 162,7 @@ def create_form(shop_id, erroneous_form=None):
    brand = brand_service.get_brand(shop.brand_id)

    article_number_sequences = (
        article_sequence_service.find_article_number_sequences_for_shop(shop.id)
        article_sequence_service.get_article_number_sequences_for_shop(shop.id)
    )
    article_number_sequence_available = bool(article_number_sequences)



@@ 190,7 190,7 @@ def create(shop_id):
    form = ArticleCreateForm(request.form)

    article_number_sequences = (
        article_sequence_service.find_article_number_sequences_for_shop(shop.id)
        article_sequence_service.get_article_number_sequences_for_shop(shop.id)
    )
    if not article_number_sequences:
        flash_error(

M byceps/blueprints/admin/shop/storefront/views.py => byceps/blueprints/admin/shop/storefront/views.py +5 -5
@@ 52,7 52,7 @@ def index_for_shop(shop_id):

def _get_order_number_prefixes_by_sequence_id(storefronts, shop_id):
    sequence_ids = {sf.order_number_sequence_id for sf in storefronts}
    sequences = order_sequence_service.find_order_number_sequences_for_shop(
    sequences = order_sequence_service.get_order_number_sequences_for_shop(
        shop_id
    )
    return {seq.id: seq.prefix for seq in sequences}


@@ 93,7 93,7 @@ def create_form(shop_id, erroneous_form=None):

    catalogs = catalog_service.get_all_catalogs()
    order_number_sequences = (
        order_sequence_service.find_order_number_sequences_for_shop(shop.id)
        order_sequence_service.get_order_number_sequences_for_shop(shop.id)
    )
    order_number_sequence_available = bool(order_number_sequences)



@@ 120,7 120,7 @@ def create(shop_id):
    catalogs = catalog_service.get_all_catalogs()

    order_number_sequences = (
        order_sequence_service.find_order_number_sequences_for_shop(shop.id)
        order_sequence_service.get_order_number_sequences_for_shop(shop.id)
    )
    if not order_number_sequences:
        flash_error(


@@ 185,7 185,7 @@ def update_form(storefront_id, erroneous_form=None):

    catalogs = catalog_service.get_all_catalogs()
    order_number_sequences = (
        order_sequence_service.find_order_number_sequences_for_shop(shop.id)
        order_sequence_service.get_order_number_sequences_for_shop(shop.id)
    )

    form = (


@@ 212,7 212,7 @@ def update(storefront_id):

    catalogs = catalog_service.get_all_catalogs()
    order_number_sequences = (
        order_sequence_service.find_order_number_sequences_for_shop(
        order_sequence_service.get_order_number_sequences_for_shop(
            storefront.shop_id
        )
    )

M byceps/services/shop/article/sequence_service.py => byceps/services/shop/article/sequence_service.py +1 -1
@@ 69,7 69,7 @@ def get_article_number_sequence(
    return _db_entity_to_article_number_sequence(sequence)


def find_article_number_sequences_for_shop(
def get_article_number_sequences_for_shop(
    shop_id: ShopID,
) -> list[ArticleNumberSequence]:
    """Return the article number sequences defined for that shop."""

M byceps/services/shop/order/sequence_service.py => byceps/services/shop/order/sequence_service.py +1 -1
@@ 67,7 67,7 @@ def get_order_number_sequence(
    return _db_entity_to_order_number_sequence(sequence)


def find_order_number_sequences_for_shop(
def get_order_number_sequences_for_shop(
    shop_id: ShopID,
) -> list[OrderNumberSequence]:
    """Return the order number sequences defined for that shop."""