Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/data-migration-sub-proposition-p…
Browse files Browse the repository at this point in the history
…age'
  • Loading branch information
engineervix committed Nov 1, 2023
2 parents a9d8bd7 + d47566f commit 07eb496
Show file tree
Hide file tree
Showing 11 changed files with 1,961 additions and 14 deletions.
14 changes: 2 additions & 12 deletions tbx/propositions/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,6 @@ class Meta:
template = "patterns/molecules/streamfield/blocks/key-points.html"


class TestimonialBlock(blocks.StructBlock):
quote = blocks.TextBlock()
name = blocks.CharBlock(max_length=255)
role = blocks.CharBlock(max_length=255)

class Meta:
icon = "openquote"
label = "Testimonial"


class TestimonialsBlock(blocks.StructBlock):
title = blocks.CharBlock(
label="Testimonials section title",
Expand All @@ -65,7 +55,7 @@ class TestimonialsBlock(blocks.StructBlock):
required=False,
)
testimonials = blocks.ListBlock(
TestimonialBlock(),
core_blocks.TestimonialBlock(),
required=False,
)

Expand Down Expand Up @@ -201,7 +191,7 @@ def get_featured_blog_posts(self, value):
"date": blog_post.date,
}
for blog_post in value.get("featured_blog_posts")
if blog_post.live
if blog_post and blog_post.live
]

def get_context(self, value, parent_context=None):
Expand Down
Empty file.
Empty file.
Loading

0 comments on commit 07eb496

Please sign in to comment.