mirror of
https://github.com/ail-project/ail-framework.git
synced 2025-01-31 14:36:15 +00:00
fix: [showpaste] fix: #346, avoid None screenshots
This commit is contained in:
parent
97fa1ddca4
commit
cc61c99290
1 changed files with 2 additions and 0 deletions
|
@ -44,6 +44,8 @@ def get_item_screenshot_path(item):
|
||||||
screenshot = r_serv_metadata.hget('paste_metadata:{}'.format(item), 'screenshot')
|
screenshot = r_serv_metadata.hget('paste_metadata:{}'.format(item), 'screenshot')
|
||||||
if screenshot:
|
if screenshot:
|
||||||
screenshot = os.path.join(screenshot[0:2], screenshot[2:4], screenshot[4:6], screenshot[6:8], screenshot[8:10], screenshot[10:12], screenshot[12:])
|
screenshot = os.path.join(screenshot[0:2], screenshot[2:4], screenshot[4:6], screenshot[6:8], screenshot[8:10], screenshot[10:12], screenshot[12:])
|
||||||
|
else:
|
||||||
|
screenshot = ''
|
||||||
return screenshot
|
return screenshot
|
||||||
|
|
||||||
def showpaste(content_range, requested_path):
|
def showpaste(content_range, requested_path):
|
||||||
|
|
Loading…
Add table
Reference in a new issue