3
0
Fork 0

fix: fix handling of Upgrade.uuid

now that it is a proper uuid7 instance, not just a string
This commit is contained in:
Lance Edgar 2024-12-03 21:29:05 -06:00
parent 48a473e540
commit 352afc1e22
2 changed files with 3 additions and 3 deletions

View file

@ -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:

View file

@ -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)