@@ -92,7 +92,7 @@ class MemoryBlock(BaseModel):
9292 timestamp : str
9393 loading : bool = False
9494 artifacts : list [Artifact ] = []
95- file_patches : list [ExplorerFilePatch ] = []
95+ file_patches : list [ExplorerFilePatch ] | None = None
9696 pr_commit_shas : dict [str , str ] | None = (
9797 None # repository name -> commit SHA. Used to track which commit was associated with each repo's PR at the time this block was created.
9898 )
@@ -159,7 +159,7 @@ def get_file_patches_by_repo(self) -> dict[str, list[ExplorerFilePatch]]:
159159 """Get file patches grouped by repository."""
160160 by_repo : dict [str , list [ExplorerFilePatch ]] = {}
161161 for block in self .blocks :
162- for fp in block .file_patches :
162+ for fp in block .file_patches or [] :
163163 if fp .repo_name not in by_repo :
164164 by_repo [fp .repo_name ] = []
165165 by_repo [fp .repo_name ].append (fp )
@@ -177,7 +177,7 @@ def _is_repo_synced(self, repo_name: str) -> bool:
177177
178178 # Find last block with patches for this repo
179179 for block in reversed (self .blocks ):
180- if any (fp .repo_name == repo_name for fp in block .file_patches ):
180+ if any (fp .repo_name == repo_name for fp in ( block .file_patches or []) ):
181181 block_sha = (block .pr_commit_shas or {}).get (repo_name )
182182 return block_sha == pr_state .commit_sha
183183 return True # No patches found = synced
0 commit comments