fix: replace uuid.uuid4() with getID() from appPublic.uniqueID for all table ID generation
This commit is contained in:
parent
df9c32450f
commit
390e288107
@ -2,6 +2,7 @@ from ahserver.serverenv import ServerEnv
|
|||||||
from appPublic.worker import awaitify
|
from appPublic.worker import awaitify
|
||||||
import json
|
import json
|
||||||
import uuid
|
import uuid
|
||||||
|
from appPublic.uniqueID import getID
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
class DashboardCore:
|
class DashboardCore:
|
||||||
@ -17,7 +18,7 @@ class DashboardCore:
|
|||||||
if not dashboard_config:
|
if not dashboard_config:
|
||||||
# 创建默认配置
|
# 创建默认配置
|
||||||
config_json = self._get_default_dashboard_config(dashboard_type)
|
config_json = self._get_default_dashboard_config(dashboard_type)
|
||||||
dashboard_id = str(uuid.uuid4()).replace('-', '')
|
dashboard_id = getID()
|
||||||
await self.db.insert('dashboard_config', {
|
await self.db.insert('dashboard_config', {
|
||||||
'id': dashboard_id,
|
'id': dashboard_id,
|
||||||
'dashboard_name': f'默认{dashboard_type}仪表板',
|
'dashboard_name': f'默认{dashboard_type}仪表板',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user