From c90fc2fedacc8ebbb8f6a12b246001bc30156ed3 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 20 Jun 2025 15:15:40 +1000 Subject: [PATCH] Improve handling of plugin metadata reading (#9816) * Improve handling of plugin metadata reading * Accessor fix --- src/backend/InvenTree/plugin/plugin.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/backend/InvenTree/plugin/plugin.py b/src/backend/InvenTree/plugin/plugin.py index 7e977ec0ff..9edc5a2696 100644 --- a/src/backend/InvenTree/plugin/plugin.py +++ b/src/backend/InvenTree/plugin/plugin.py @@ -442,15 +442,15 @@ class InvenTreePlugin(VersionMixin, MixinBase, MetaBase): try: website = meta['Project-URL'].split(', ')[1] - except (ValueError, IndexError, AttributeError): - website = meta['Project-URL'] + except Exception: + website = meta.get('Project-URL') return { - 'author': meta['Author-email'], - 'description': meta['Summary'], - 'version': meta['Version'], + 'author': meta.get('Author-email'), + 'description': meta.get('Summary'), + 'version': meta.get('Version'), 'website': website, - 'license': meta['License'], + 'license': meta.get('License'), } def define_package(self):