From 7796955f1f5050b728cfe4bdc3fff4f9d3199661 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 17 Jan 2023 10:45:57 +0000 Subject: [PATCH] Value or href --- webapp_post.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/webapp_post.py b/webapp_post.py index 9979c23f3..49e98cf7c 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -1799,11 +1799,14 @@ def _get_content_license(post_json_object: {}) -> str: for item in post_json_object['object']['attachment']: if not item.get('name'): continue - if not item.get('value'): - continue if item['name'] != 'license': continue - value = item['value'] + if item.get('value'): + value = item['value'] + if item.get('href'): + value = item['href'] + else: + continue if '://' not in value: value = license_link_from_name(value) return value