Commit a5e63b58 authored by contabo-server's avatar contabo-server
Browse files

fix delete condition

parent 5fca45f2
......@@ -17,7 +17,7 @@ def get_and_check_share(share_id, decrease_limit=False) -> Share:
if share.download_limit and decrease_limit:
share.download_limit -= 1
if (share.download_limit and share.download_limit < 0) or\
if (share.download_limit and share.download_limit <= 0) or\
(share.expires is not None and > share.expires):
return None
......@@ -134,7 +134,7 @@ def media(share_id, filename):
def zip_attachments(share_id):
share = get_and_check_share(share_id)
share = get_and_check_share(share_id, decrease_limit=True)
if share is None: return redirect(url_for('expired'))
if share.password:
if share_id not in session:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment