kopia lustrzana https://github.com/wagtail/wagtail
Tidy up
- Removed catch all blocks - get_embed never returns None so removed check for thatpull/1381/head
rodzic
3737e026bc
commit
225f54ad6c
|
@ -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)
|
||||
|
|
Ładowanie…
Reference in New Issue