From 1ea12fedb91e1c351e40624d4de39d3a9ff92f6c Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sun, 20 Dec 2020 22:08:27 +0100 Subject: [PATCH] Don't force string format on file meta data (must be able to handle NoneType) --- nw/core/document.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nw/core/document.py b/nw/core/document.py index 7ae8f4de..67cd1253 100644 --- a/nw/core/document.py +++ b/nw/core/document.py @@ -149,9 +149,9 @@ class NWDoc(): docMeta = "" else: docMeta = ( - f"%%~name: {self._theItem.itemName:s}\n" - f"%%~path: {self._theItem.itemParent:s}/{self._theItem.itemHandle:s}\n" - f"%%~kind: {self._theItem.itemClass.name:s}/{self._theItem.itemLayout.name:s}\n" + f"%%~name: {self._theItem.itemName}\n" + f"%%~path: {self._theItem.itemParent}/{self._theItem.itemHandle}\n" + f"%%~kind: {self._theItem.itemClass.name}/{self._theItem.itemLayout.name}\n" ) try: