feat: Handle missing keys in generator configs

This commit is contained in:
oSumAtrIX 2023-10-29 23:44:44 +01:00
parent 36295fec64
commit 1e515062d5
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -3,7 +3,6 @@ from app import api
from app.utils import get_repository_name, to_json, write_json, read_json, create_if_not_exists
from abc import abstractmethod
class Generator:
_api: api.Api
@ -137,8 +136,8 @@ class DonationsGenerator(Generator):
super().__init__("donations", api)
def generate(self, config, path):
donation_links = config["links"]
donation_wallets = config["wallets"]
donation_links = config["links"] if "links" in config else []
donation_wallets = config["wallets"] if "wallets" in config else []
donation_path = join(path, f"donations.json")