Skip to content

Commit

Permalink
fix: use default group settings if not execution workflow (fixes attr…
Browse files Browse the repository at this point in the history
…ibute error occurring with --report) (#2617)

This avoids the error `AttributeError: 'NoneType' object has no
attribute 'local_groupid'`, e.g. occurring when trying to create a
report

### QC
<!-- Make sure that you can tick the boxes below. -->

* [ ] The PR contains a test case for the changes or the changes are
already covered by an existing test case.
* [ ] The documentation (`docs/`) is updated to reflect the changes or
this is not necessary (e.g. if the change does neither modify the
language nor the behavior or functionalities of Snakemake).
  • Loading branch information
johanneskoester committed Jan 15, 2024
1 parent c6d7141 commit 21e9964
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions snakemake/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ def _workflow(self):
def _get_workflow(self, **kwargs):
from snakemake.workflow import Workflow

if "group_settings" not in kwargs:
# just init with defaults, can be overwritten later
kwargs["group_settings"] = GroupSettings()

return Workflow(
config_settings=self.config_settings,
resource_settings=self.resource_settings,
Expand Down

0 comments on commit 21e9964

Please sign in to comment.