diff --git a/shares.py b/shares.py index 1c8b08d51..ee874171c 100644 --- a/shares.py +++ b/shares.py @@ -2228,10 +2228,13 @@ def _is_valueflows_attachment(attach_item: {}) -> bool: """Returns true if the given item is a ValueFlows entry within the actor attachment list """ - if 'rel' in attach_item and 'href' in attach_item: + if 'rel' in attach_item and \ + 'href' in attach_item and \ + 'name' in attach_item: if isinstance(attach_item['rel'], list) and \ + isinstance(attach_item['name'], str) and \ isinstance(attach_item['href'], str): - if len(attach_item['rel']) == 2: + if len(attach_item['rel']) == 2 and len(attach_item['name'] > 1): if attach_item['rel'][0] == 'payment' and \ attach_item['rel'][1].endswith('/valueflows/Proposal'): return True