commit
This commit is contained in:
@@ -7,7 +7,7 @@ django.setup()
|
|||||||
from shop.models import ESP32Config
|
from shop.models import ESP32Config
|
||||||
|
|
||||||
def populate():
|
def populate():
|
||||||
# 检查数据库是否已有数据,如果有则跳过,避免每次构建都重置
|
# 检查数据库是否已有数据,如果有则跳过,避免每次构建都重置!
|
||||||
if ESP32Config.objects.exists():
|
if ESP32Config.objects.exists():
|
||||||
print("ESP32Config data already exists, skipping population.")
|
print("ESP32Config data already exists, skipping population.")
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user