From 35966e7e95bf428ec17509410c37e80e2e98bae6 Mon Sep 17 00:00:00 2001 From: Miroslav Bauer Date: Wed, 30 Oct 2024 16:07:55 +0100 Subject: [PATCH] fix(FilesViewer): handle undefined file size while uploading --- .../templates/components/datafields/files/FilesViewer.jinja | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/oarepo_ui/templates/components/datafields/files/FilesViewer.jinja b/oarepo_ui/templates/components/datafields/files/FilesViewer.jinja index 075b3702..8cf3954c 100644 --- a/oarepo_ui/templates/components/datafields/files/FilesViewer.jinja +++ b/oarepo_ui/templates/components/datafields/files/FilesViewer.jinja @@ -19,7 +19,7 @@ {{ file.key }} - {{ file.size | filesizeformat }} + {{ (file.size or 0) | filesizeformat }} {% if file.links.preview %}