bton/prohibit_sending_empty_emails #100
1 changed files with 4 additions and 0 deletions
|
@ -38,6 +38,8 @@ def media_urls(request, hash):
|
||||||
'Age': 0,
|
'Age': 0,
|
||||||
'ETag': file.hash,
|
'ETag': file.hash,
|
||||||
})
|
})
|
||||||
|
except FileNotFoundError:
|
||||||
|
return Response(status=status.HTTP_404_NOT_FOUND)
|
||||||
except File.DoesNotExist:
|
except File.DoesNotExist:
|
||||||
return Response(status=status.HTTP_404_NOT_FOUND)
|
return Response(status=status.HTTP_404_NOT_FOUND)
|
||||||
except EmailAttachment.DoesNotExist:
|
except EmailAttachment.DoesNotExist:
|
||||||
|
@ -80,6 +82,8 @@ def thumbnail_urls(request, size, hash):
|
||||||
'ETag': file.hash + "_" + str(size),
|
'ETag': file.hash + "_" + str(size),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
except FileNotFoundError:
|
||||||
|
return Response(status=status.HTTP_404_NOT_FOUND)
|
||||||
except File.DoesNotExist:
|
except File.DoesNotExist:
|
||||||
return Response(status=status.HTTP_404_NOT_FOUND)
|
return Response(status=status.HTTP_404_NOT_FOUND)
|
||||||
except EmailAttachment.DoesNotExist:
|
except EmailAttachment.DoesNotExist:
|
||||||
|
|
Loading…
Add table
Reference in a new issue