2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 11:10:54 +00:00

Improve handling of plugin metadata reading (#9816)

* Improve handling of plugin metadata reading

* Accessor fix
This commit is contained in:
Oliver
2025-06-20 15:15:40 +10:00
committed by GitHub
parent 786b52d016
commit c90fc2feda

View File

@ -442,15 +442,15 @@ class InvenTreePlugin(VersionMixin, MixinBase, MetaBase):
try: try:
website = meta['Project-URL'].split(', ')[1] website = meta['Project-URL'].split(', ')[1]
except (ValueError, IndexError, AttributeError): except Exception:
website = meta['Project-URL'] website = meta.get('Project-URL')
return { return {
'author': meta['Author-email'], 'author': meta.get('Author-email'),
'description': meta['Summary'], 'description': meta.get('Summary'),
'version': meta['Version'], 'version': meta.get('Version'),
'website': website, 'website': website,
'license': meta['License'], 'license': meta.get('License'),
} }
def define_package(self): def define_package(self):