Skip to content

Commit

Permalink
Update src/tdastro/base_models.py
Browse files Browse the repository at this point in the history
Co-authored-by: Olivia R. Lynn <[email protected]>
  • Loading branch information
jeremykubica and OliviaLynn authored Jun 28, 2024
1 parent 4545f40 commit d1140a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tdastro/base_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def add_parameter(self, name, value=None, required=False, **kwargs):
Raise a ``KeyError`` if there is a parameter collision.
Raise a ``ValueError`` if the parameter is required, but set to None.
"""
if hasattr(self, name):
if hasattr(self, name) and getattr(self, name) is not None:
raise KeyError(f"Duplicate parameter set: {KeyError}")

if value is None and name in kwargs:
Expand Down

0 comments on commit d1140a5

Please sign in to comment.