diff --git a/CHANGELOG.md b/CHANGELOG.md index 14b16d64..5ba9c8b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ This changelog is effective from the 2025 releases. ### Fixed * Loading job `.dill` files where the molecule contains a `pathlib.Path` (e.g. `Molecule.properties.source`) * Possible recursion errors when pickling a molecule on Windows relating to `_as_array` +* Xvfb backend for `view` function with 0 display value ## 2026.102 diff --git a/src/scm/plams/tools/view.py b/src/scm/plams/tools/view.py index 7372e692..35d238d1 100644 --- a/src/scm/plams/tools/view.py +++ b/src/scm/plams/tools/view.py @@ -1053,7 +1053,7 @@ def display(self) -> Optional[str]: """ Get current display value, if available """ - return f":{self.display_number}" if self.display_number else None + return f":{self.display_number}" if self.display_number is not None else None @contextmanager def session(self, env: Optional[Dict[str, str]] = None) -> Generator[Dict[str, str], None, None]: