Skip to content

Commit

Permalink
Fixes #31
Browse files Browse the repository at this point in the history
  • Loading branch information
MetinSa committed Jun 28, 2024
1 parent 76f5485 commit d61e697
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions zodipy/zodiacal_light_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ def register_model(
if (name := name.lower()) in self._registry:
msg = f"a model by the name {name!s} is already registered."
raise ValueError(msg)
if not isinstance(model, ZodiacalLightModel):
msg = "model must be an instance of ZodiacalLightModel."
raise TypeError(msg)
self._registry[name] = model

def get_model(self, name: str) -> ZodiacalLightModel:
Expand Down

0 comments on commit d61e697

Please sign in to comment.