We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[CT-3210] [Bug] Error using `dbt list --select` when there is a cross-project model that is `version=0` in the parent project
### Is this a new bug in dbt-core?

- [X] I believe this is a new bug in dbt-core
- [X] I have searched the existing issues, and I could not find an existing issue for this bug

### Current Behavior

When you attempt to reference a model version 0, you get a stack trace error.



### Expected Behavior

We should allow you to set model version to be 0.

### Steps To Reproduce

1. On parent/hub project, add a versioned model with `v: 0`
2. On the child/spoke project, attempt to reference that versioned model in a model:
  `select * from {{ ref('example_hub', 'my_second_dbt_model', v=0) }}`
3. run `dbt list --select anything`

Outstanding question - is this only affecting cross-project refs? Or all refs to a model with `v: 0`?

### Relevant log output

_No response_

### Environment

```markdown
- OS:
- Python:
- dbt:
```


### Which database adapter are you using with dbt?

_No response_

### Additional Context

_No response_

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `core/dbt/contracts/graph/node_args.py`
Content:
```
1 from dataclasses import dataclass, field
2 from datetime import datetime
3 from typing import Optional, List
4 
5 from dbt.contracts.graph.unparsed import NodeVersion
6 from dbt.node_types import NodeType, AccessType
7 
8 
9 @dataclass
10 class ModelNodeArgs:
11     name: str
12     package_name: str
13     identifier: str
14     schema: str
15     database: Optional[str] = None
16     relation_name: Optional[str] = None
17     version: Optional[NodeVersion] = None
18     latest_version: Optional[NodeVersion] = None
19     deprecation_date: Optional[datetime] = None
20     access: Optional[str] = AccessType.Protected.value
21     generated_at: datetime = field(default_factory=datetime.utcnow)
22     depends_on_nodes: List[str] = field(default_factory=list)
23     enabled: bool = True
24 
25     @property
26     def unique_id(self) -> str:
27         unique_id = f"{NodeType.Model}.{self.package_name}.{self.name}"
28         if self.version:
29             unique_id = f"{unique_id}.v{self.version}"
30 
31         return unique_id
32 
33     @property
34     def fqn(self) -> List[str]:
35         fqn = [self.package_name, self.name]
36         if self.version:
37             fqn.append(f"v{self.version}")
38 
39         return fqn
40
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/core/dbt/contracts/graph/node_args.py b/core/dbt/contracts/graph/node_args.py
--- a/core/dbt/contracts/graph/node_args.py
+++ b/core/dbt/contracts/graph/node_args.py
@@ -33,7 +33,8 @@
     @property
     def fqn(self) -> List[str]:
         fqn = [self.package_name, self.name]
-        if self.version:
+        # Test for None explicitly because version can be 0
+        if self.version is not None:
             fqn.append(f"v{self.version}")
 
         return fqn

{"golden_diff": "diff --git a/core/dbt/contracts/graph/node_args.py b/core/dbt/contracts/graph/node_args.py\n--- a/core/dbt/contracts/graph/node_args.py\n+++ b/core/dbt/contracts/graph/node_args.py\n@@ -33,7 +33,8 @@\n     @property\n     def fqn(self) -> List[str]:\n         fqn = [self.package_name, self.name]\n-        if self.version:\n+        # Test for None explicitly because version can be 0\n+        if self.version is not None:\n             fqn.append(f\"v{self.version}\")\n \n         return fqn\n", "issue": "[CT-3210] [Bug] Error using `dbt list --select` when there is a cross-project model that is `version=0` in the parent project\n### Is this a new bug in dbt-core?\r\n\r\n- [X] I believe this is a new bug in dbt-core\r\n- [X] I have searched the existing issues, and I could not find an existing issue for this bug\r\n\r\n### Current Behavior\r\n\r\nWhen you attempt to reference a model version 0, you get a stack trace error.\r\n\r\n\r\n\r\n### Expected Behavior\r\n\r\nWe should allow you to set model version to be 0.\r\n\r\n### Steps To Reproduce\r\n\r\n1. On parent/hub project, add a versioned model with `v: 0`\r\n2. On the child/spoke project, attempt to reference that versioned model in a model:\r\n  `select * from {{ ref('example_hub', 'my_second_dbt_model', v=0) }}`\r\n3. run `dbt list --select anything`\r\n\r\nOutstanding question - is this only affecting cross-project refs? Or all refs to a model with `v: 0`?\r\n\r\n### Relevant log output\r\n\r\n_No response_\r\n\r\n### Environment\r\n\r\n```markdown\r\n- OS:\r\n- Python:\r\n- dbt:\r\n```\r\n\r\n\r\n### Which database adapter are you using with dbt?\r\n\r\n_No response_\r\n\r\n### Additional Context\r\n\r\n_No response_\n", "before_files": [{"content": "from dataclasses import dataclass, field\nfrom datetime import datetime\nfrom typing import Optional, List\n\nfrom dbt.contracts.graph.unparsed import NodeVersion\nfrom dbt.node_types import NodeType, AccessType\n\n\n@dataclass\nclass ModelNodeArgs:\n    name: str\n    package_name: str\n    identifier: str\n    schema: str\n    database: Optional[str] = None\n    relation_name: Optional[str] = None\n    version: Optional[NodeVersion] = None\n    latest_version: Optional[NodeVersion] = None\n    deprecation_date: Optional[datetime] = None\n    access: Optional[str] = AccessType.Protected.value\n    generated_at: datetime = field(default_factory=datetime.utcnow)\n    depends_on_nodes: List[str] = field(default_factory=list)\n    enabled: bool = True\n\n    @property\n    def unique_id(self) -> str:\n        unique_id = f\"{NodeType.Model}.{self.package_name}.{self.name}\"\n        if self.version:\n            unique_id = f\"{unique_id}.v{self.version}\"\n\n        return unique_id\n\n    @property\n    def fqn(self) -> List[str]:\n        fqn = [self.package_name, self.name]\n        if self.version:\n            fqn.append(f\"v{self.version}\")\n\n        return fqn\n", "path": "core/dbt/contracts/graph/node_args.py"}], "after_files": [{"content": "from dataclasses import dataclass, field\nfrom datetime import datetime\nfrom typing import Optional, List\n\nfrom dbt.contracts.graph.unparsed import NodeVersion\nfrom dbt.node_types import NodeType, AccessType\n\n\n@dataclass\nclass ModelNodeArgs:\n    name: str\n    package_name: str\n    identifier: str\n    schema: str\n    database: Optional[str] = None\n    relation_name: Optional[str] = None\n    version: Optional[NodeVersion] = None\n    latest_version: Optional[NodeVersion] = None\n    deprecation_date: Optional[datetime] = None\n    access: Optional[str] = AccessType.Protected.value\n    generated_at: datetime = field(default_factory=datetime.utcnow)\n    depends_on_nodes: List[str] = field(default_factory=list)\n    enabled: bool = True\n\n    @property\n    def unique_id(self) -> str:\n        unique_id = f\"{NodeType.Model}.{self.package_name}.{self.name}\"\n        if self.version:\n            unique_id = f\"{unique_id}.v{self.version}\"\n\n        return unique_id\n\n    @property\n    def fqn(self) -> List[str]:\n        fqn = [self.package_name, self.name]\n        # Test for None explicitly because version can be 0\n        if self.version is not None:\n            fqn.append(f\"v{self.version}\")\n\n        return fqn\n", "path": "core/dbt/contracts/graph/node_args.py"}]}