fix: product_id 충돌 해결 (임의 생성 5종 → MASTER-017~021)
This commit is contained in:
16
check_json.py
Normal file
16
check_json.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import json
|
||||
import os
|
||||
|
||||
master_dir = r'C:\Users\청춘약국\source\animal-medication-api\data\master'
|
||||
|
||||
for filename in sorted(os.listdir(master_dir)):
|
||||
if filename.endswith('.json'):
|
||||
filepath = os.path.join(master_dir, filename)
|
||||
try:
|
||||
with open(filepath, 'r', encoding='utf-8') as f:
|
||||
data = json.load(f)
|
||||
pid = data.get('product_id', 'NO_ID')
|
||||
print(f'OK: {filename} ({pid})')
|
||||
except Exception as e:
|
||||
print(f'ERROR: {filename} - {e}')
|
||||
Reference in New Issue
Block a user