Skip to content

Commit a6ddbbf

Browse files
Potential fix for pull request finding 'Empty except'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
1 parent 408a778 commit a6ddbbf

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/specify_cli/extensions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,6 +1152,7 @@ def _fetch_single_catalog(self, entry: CatalogEntry, force_refresh: bool = False
11521152
age = (datetime.now(timezone.utc) - cached_at).total_seconds()
11531153
is_valid = age < self.CACHE_DURATION
11541154
except (json.JSONDecodeError, ValueError, KeyError):
1155+
# If metadata is invalid or missing expected fields, treat cache as invalid
11551156
pass
11561157

11571158
# Use cache if valid

0 commit comments

Comments
 (0)