Fix plugin meta lookup (#4684)

* fix website lookup

* use the raw data on error
This commit is contained in:
Matthias Mair 2023-04-24 00:28:50 +02:00 committed by GitHub
parent 5411cf0878
commit d7bdcd95a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -364,11 +364,16 @@ class InvenTreePlugin(VersionMixin, MixinBase, MetaBase):
# Not much information we can extract at this point # Not much information we can extract at this point
return {} return {}
try:
website = meta['Project-URL'].split(', ')[1]
except [ValueError, IndexError]:
website = meta['Project-URL']
return { return {
'author': meta['Author-email'], 'author': meta['Author-email'],
'description': meta['Summary'], 'description': meta['Summary'],
'version': meta['Version'], 'version': meta['Version'],
'website': meta['Project-URL'], 'website': website,
'license': meta['License'] 'license': meta['License']
} }