From 9356cedf71e8fe8ca3c6707042d0d3ad48fb4989 Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Wed, 27 Nov 2024 13:41:55 +0100 Subject: [PATCH] Make mypy happy --- python/ribasim/ribasim/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ribasim/ribasim/model.py b/python/ribasim/ribasim/model.py index 7457b4b45..d46b648b0 100644 --- a/python/ribasim/ribasim/model.py +++ b/python/ribasim/ribasim/model.py @@ -307,7 +307,7 @@ def write(self, filepath: str | PathLike[str]) -> Path: if self.use_validation: self._validate_model() - if self.edge.df.subnetwork_id.notna().any(): + if self.edge.df is not None and self.edge.df["subnetwork_id"].notna().any(): warnings.warn( "Sources for allocation are automatically inferred and no longer have to be specified in the `Edge` table.", DeprecationWarning,