forked from mirrors/bookwyrm
Fixes preview tests
This commit is contained in:
parent
491d68353d
commit
8e7c43baa7
1 changed files with 12 additions and 9 deletions
|
@ -150,6 +150,7 @@ def generate_instance_layer(content_width):
|
||||||
|
|
||||||
def generate_rating_layer(rating, content_width):
|
def generate_rating_layer(rating, content_width):
|
||||||
"""Places components for rating preview"""
|
"""Places components for rating preview"""
|
||||||
|
try:
|
||||||
icon_star_full = Image.open(
|
icon_star_full = Image.open(
|
||||||
os.path.join(settings.STATIC_ROOT, "images/icons/star-full.png")
|
os.path.join(settings.STATIC_ROOT, "images/icons/star-full.png")
|
||||||
)
|
)
|
||||||
|
@ -159,6 +160,8 @@ def generate_rating_layer(rating, content_width):
|
||||||
icon_star_half = Image.open(
|
icon_star_half = Image.open(
|
||||||
os.path.join(settings.STATIC_ROOT, "images/icons/star-half.png")
|
os.path.join(settings.STATIC_ROOT, "images/icons/star-half.png")
|
||||||
)
|
)
|
||||||
|
except FileNotFoundError:
|
||||||
|
return None
|
||||||
|
|
||||||
icon_size = 64
|
icon_size = 64
|
||||||
icon_margin = 10
|
icon_margin = 10
|
||||||
|
|
Loading…
Reference in a new issue