From 352afc1e22d5bd9867493f4992f1f51839d6e659 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 3 Dec 2024 21:29:05 -0600 Subject: [PATCH] fix: fix handling of `Upgrade.uuid` now that it is a proper uuid7 instance, not just a string --- src/wuttaweb/views/upgrades.py | 2 +- tests/views/test_upgrades.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wuttaweb/views/upgrades.py b/src/wuttaweb/views/upgrades.py index 03570f3..3a913d0 100644 --- a/src/wuttaweb/views/upgrades.py +++ b/src/wuttaweb/views/upgrades.py @@ -217,7 +217,7 @@ class UpgradeView(MasterView): def get_upgrade_filepath(self, upgrade, filename=None, create=True): """ """ - uuid = upgrade.uuid + uuid = str(upgrade.uuid) path = self.app.get_appdir('data', 'upgrades', uuid[:2], uuid[2:], create=create) if filename: diff --git a/tests/views/test_upgrades.py b/tests/views/test_upgrades.py index 6c89d5b..1a1d626 100644 --- a/tests/views/test_upgrades.py +++ b/tests/views/test_upgrades.py @@ -127,7 +127,7 @@ class TestUpgradeView(WebTestCase): self.session.commit() view = self.make_view() - uuid = upgrade.uuid + uuid = str(upgrade.uuid) # no filename path = view.download_path(upgrade, None) @@ -153,7 +153,7 @@ class TestUpgradeView(WebTestCase): self.session.commit() view = self.make_view() - uuid = upgrade.uuid + uuid = str(upgrade.uuid) # no filename path = view.get_upgrade_filepath(upgrade)