From d7bdcd95a60eb4fb77603df1d4b7d6a7ca9d1703 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Mon, 24 Apr 2023 00:28:50 +0200 Subject: [PATCH] Fix plugin meta lookup (#4684) * fix website lookup * use the raw data on error --- InvenTree/plugin/plugin.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/InvenTree/plugin/plugin.py b/InvenTree/plugin/plugin.py index 806ee182a2..3fdaa702e2 100644 --- a/InvenTree/plugin/plugin.py +++ b/InvenTree/plugin/plugin.py @@ -364,11 +364,16 @@ class InvenTreePlugin(VersionMixin, MixinBase, MetaBase): # Not much information we can extract at this point return {} + try: + website = meta['Project-URL'].split(', ')[1] + except [ValueError, IndexError]: + website = meta['Project-URL'] + return { 'author': meta['Author-email'], 'description': meta['Summary'], 'version': meta['Version'], - 'website': meta['Project-URL'], + 'website': website, 'license': meta['License'] }