diff --git a/hydromt_sfincs/sfincs.py b/hydromt_sfincs/sfincs.py index bd0bd090..dbdd47f9 100644 --- a/hydromt_sfincs/sfincs.py +++ b/hydromt_sfincs/sfincs.py @@ -3719,7 +3719,7 @@ def _parse_datasets_riv(self, datasets_riv): "gdf_riv", "gdf_riv_mask", "gdf_zb", - "point_zb" + "point_zb", ] copy_keys = [] attrs = ["rivwth", "rivdph", "rivbed", "manning"] @@ -3756,9 +3756,12 @@ def _parse_datasets_riv(self, datasets_riv): geom=self.mask.raster.box, ) dd.update({"gdf_zb": gdf_zb}) - + if "gdf_riv" in dd: - if not gdf_riv.columns.isin(["rivbed", "rivdph"]).any() and "gdf_zb" not in dd: + if ( + not gdf_riv.columns.isin(["rivbed", "rivdph"]).any() + and "gdf_zb" not in dd + ): raise ValueError("No 'rivbed' or 'rivdph' attribute found.") else: raise ValueError("No 'centerlines' dataset provided.")