Skip to content

Commit

Permalink
avoid errors creating Formula from Preset
Browse files Browse the repository at this point in the history
  • Loading branch information
biuti committed Jul 17, 2023
1 parent 29fd49b commit 1bf6000
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion airscore/core/formula.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1bf6000

Please sign in to comment.