소스 검색

punoted.storage: fix names

it's actually JSON null now, not "null"
raylu 1 주 전
부모
커밋
afcc8b467f
1개의 변경된 파일과 1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      punoted/storage.py

+ 1 - 3
punoted/storage.py

@@ -14,9 +14,7 @@ def main():
 	for storage in storages:
 		for item in storage['StorageItems']:
 			if item['MaterialTicker'] in items:
-				name = storage['Name']
-				if name == 'null':
-					name = storage['Location']
+				name = storage['Name'] or storage['Location']
 				print(f'{name}: {item["MaterialAmount"]} {item["MaterialTicker"]}')
 
 class Storage(typing.TypedDict):