Add None check for sanitize_entry

This commit is contained in:
Jedrzej Kosinski 2025-10-21 20:02:01 -07:00
parent 291ceccf54
commit 8fc1f6e0eb

View File

@ -44,7 +44,9 @@ class SubgraphManager:
entry['data'] = f.read()
return entry
async def sanitize_entry(self, entry: SubgraphEntry, remove_data=False) -> SubgraphEntry:
async def sanitize_entry(self, entry: SubgraphEntry | None, remove_data=False) -> SubgraphEntry | None:
if entry is None:
return None
entry = entry.copy()
entry.pop('path', None)
if remove_data: