From 199f710e102042103e3358c7b31edefdddacaf89 Mon Sep 17 00:00:00 2001 From: Sewon Ahn Date: Sat, 16 Jan 2021 22:18:06 +0900 Subject: [PATCH] Remove fid in events --- distribusi/distribusi/distribusi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distribusi/distribusi/distribusi.py b/distribusi/distribusi/distribusi.py index b260da6..29cf46b 100644 --- a/distribusi/distribusi/distribusi.py +++ b/distribusi/distribusi/distribusi.py @@ -92,7 +92,7 @@ def div(args, type_, subtype, tag, name, fid): else: filename = '{}'.format(name) - if len(str(fid)) >= 36: # detect if fid is uuid + if len(str(fid)) >= 36 or fid<0: # detect if fid is uuid if 'image' in type_: html = '
{}
' elif 'pdf' in subtype: @@ -110,7 +110,7 @@ def div(args, type_, subtype, tag, name, fid): elif 'dir' in type_ or 'html' in subtype or 'unkown-file' in subtype: html = '
{}#{}
' else: - html = '
{}' + filename + '#{}
' + html = '
{}' + filename + '#{}
' html = html.format(subtype, fid, tag, fid) return html