1
0
mirror of https://github.com/Tygs/0bin.git synced 2023-08-10 21:13:00 +03:00

fix(burn_after_reading): fixes burn after reading deletion

This commit is contained in:
Jean-Christophe Saad-Dupuy 2014-07-07 02:00:45 +02:00
parent 94810caae6
commit da4a5d2962

View File

@ -104,7 +104,12 @@ def display_paste(paste_id):
keep_alive = False
try:
paste = Paste.load(paste_id)
if not paste.is_alive():
# check for burn notice and is alive for the redirection
if paste.is_burn_notice:
keep_alive = paste.is_alive
if not keep_alive:
paste.delete()
elif not paste.is_alive:
paste.delete()
raise ValueError()