mirror of
https://github.com/revanced/revanced-static-api.git
synced 2025-04-29 22:24:37 +02:00
feat: Handle missing keys in generator configs
This commit is contained in:
parent
36295fec64
commit
1e515062d5
@ -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")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user