diff --git a/network-api/networkapi/nav/blocks.py b/network-api/networkapi/nav/blocks.py index d71df666ff6..e89b216dc90 100644 --- a/network-api/networkapi/nav/blocks.py +++ b/network-api/networkapi/nav/blocks.py @@ -1,3 +1,4 @@ +from wagtail import blocks from wagtail.telepath import register from networkapi.wagtailpages.pagemodels.customblocks.common.base_link_block import ( @@ -17,6 +18,8 @@ def open_in_new_window(self) -> bool: class NavLinkBlock(BaseLinkBlock): + description = blocks.CharBlock(required=False, max_length=100) + class Meta: value_class = NavLinkValue label = "Navigation Link" diff --git a/network-api/networkapi/nav/factories.py b/network-api/networkapi/nav/factories.py index aec8757a02b..5be975fa689 100644 --- a/network-api/networkapi/nav/factories.py +++ b/network-api/networkapi/nav/factories.py @@ -41,6 +41,7 @@ class Params: relative_url_link = factory.Trait(link_to="relative_url", relative_url=f'/{factory.Faker("uri_path")}') label = factory.Faker("sentence", nb_words=3) + description = factory.Faker("sentence", nb_words=6) # Setup default link as external URL (it won't pass validation without a link type defined though # so it's still necessary to use the factory with traits)