Fix settings 500: add missing block_id to FXBlock, rebuild UI
- FXBlock was missing block_id field (and __post_init__ auto-generator) causing AttributeError on /settings and /api/presets endpoints. - Rebuilt Helix Vite UI from ui/ source (index-jhtO2NOz.js, index-D3aC6klh.css). Replaces older dist files.
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import datetime
|
||||
import hashlib
|
||||
import enum
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Optional
|
||||
@@ -92,6 +94,13 @@ class FXBlock:
|
||||
subtype: str = "" # Algorithm variant (e.g. "hall"/"spring"/"plate" for reverb)
|
||||
nam_model_path: str = "" # Path to .nam file (for NAM_AMP type)
|
||||
ir_file_path: str = "" # Path to .wav IR file (for IR_CAB type)
|
||||
block_id: str = "" # Unique instance ID within a chain (auto-filled if empty)
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
"""Auto-generate block_id if empty."""
|
||||
if not self.block_id:
|
||||
raw = f"{self.fx_type.value}_{datetime.datetime.now(datetime.timezone.utc).timestamp()}_{id(self)}"
|
||||
self.block_id = hashlib.md5(raw.encode()).hexdigest()[:12]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
Reference in New Issue
Block a user