mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-20 04:51:55 +00:00
Tidy up
- Removed catch all blocks - get_embed never returns None so removed check for that
This commit is contained in:
parent
3737e026bc
commit
225f54ad6c
2 changed files with 2 additions and 8 deletions
|
|
@ -22,7 +22,7 @@ def embed_to_frontend_html(url):
|
|||
})
|
||||
else:
|
||||
return ''
|
||||
except:
|
||||
except embeds.EmbedNotFoundException:
|
||||
return ''
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,10 +10,4 @@ register = template.Library()
|
|||
@register.filter
|
||||
def embed(url, max_width=None):
|
||||
embed = embeds.get_embed(url, max_width=max_width)
|
||||
try:
|
||||
if embed is not None:
|
||||
return mark_safe(embed.html)
|
||||
else:
|
||||
return ''
|
||||
except:
|
||||
return ''
|
||||
return mark_safe(embed.html)
|
||||
|
|
|
|||
Loading…
Reference in a new issue