From 1bf6000da44cf7d6273fa8ed8c3c1ccbd0e11db7 Mon Sep 17 00:00:00 2001 From: Antonio Golfari Date: Tue, 18 Jul 2023 01:41:14 +0200 Subject: [PATCH] avoid errors creating Formula from Preset --- airscore/core/formula.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/airscore/core/formula.py b/airscore/core/formula.py index abf2203c..768bc55b 100644 --- a/airscore/core/formula.py +++ b/airscore/core/formula.py @@ -142,7 +142,8 @@ def __init__( country_scoring=False, country_size=0, max_country_size=0, - team_over=None + team_over=None, + **kwargs ): self.comp_id = comp_id @@ -183,6 +184,9 @@ def __init__( self.max_country_size = max_country_size self.team_over = team_over + for k,v in kwargs.items(): + setattr(self, k, v) + def __eq__(self, other): if not isinstance(other, Formula): # don't attempt to compare against unrelated types