update: fix crash when liberapay: or open_collective: not in FUNDING.yml

closes #799
This commit is contained in:
Hans-Christoph Steiner 2020-06-24 20:54:16 +02:00 committed by Marcus Hoffmann
parent 82eceebd13
commit 238f048257
2 changed files with 45 additions and 2 deletions

View file

@ -936,8 +936,10 @@ def insert_funding_yml_donation_links(apps):
if s:
app['OpenCollective'] = s
if not app.get('Donate'):
del(data['liberapay'])
del(data['open_collective'])
if 'liberapay' in data:
del(data['liberapay'])
if 'open_collective' in data:
del(data['open_collective'])
# this tuple provides a preference ordering
for k in ('custom', 'github', 'patreon', 'community_bridge', 'ko_fi', 'issuehunt'):
v = data.get(k)