Skip to content

Commit

Permalink
Fix loading caches without preview and thumbnail data
Browse files Browse the repository at this point in the history
  • Loading branch information
TojikCZ authored and ondratu committed Oct 20, 2023
1 parent db3e918 commit 18a5bff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gcode_metadata/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ def load_cache(self):
try:
with open(self.cache_name, "r", encoding='utf-8') as file:
cache_data = json.load(file)
preview = cache_data["preview"]
icon = cache_data["icon"]
preview = cache_data.get("preview")
icon = cache_data.get("icon")

self.thumbnails = {}

Expand Down

0 comments on commit 18a5bff

Please sign in to comment.