Fix tests

This commit is contained in:
Gabriel Augendre 2020-11-28 20:29:55 +01:00
parent a3bd932a2d
commit 7b20f6d3b7
No known key found for this signature in database
GPG key ID: 1E693F4CE4AEE7B4

View file

@ -45,9 +45,10 @@ def plausible(request):
def open_graph_image_url(request):
if request.path in IGNORED_PATHS:
return {}
open_graph_image = Attachment.objects.get_open_graph_image()
return {
"open_graph_image_url": open_graph_image.processed_file.get_full_absolute_url(
request
)
}
url = ""
if open_graph_image:
url = open_graph_image.processed_file.get_full_absolute_url(request)
return {"open_graph_image_url": url}