fix: align ActivityType enum with database schema values
- ActivityType enum now uses 'hunt', 'mine', 'craft' to match database CHECK constraint - Setup wizard activity_combo uses correct database values - Fixes CHECK constraint failed error when creating projects
This commit is contained in:
parent
e9378f2176
commit
f1ac4c22c5
|
|
@ -41,9 +41,9 @@ class SessionState(Enum):
|
||||||
|
|
||||||
class ActivityType(Enum):
|
class ActivityType(Enum):
|
||||||
"""Activity type enumeration."""
|
"""Activity type enumeration."""
|
||||||
HUNTING = ("hunting", "🎯 Hunting", "#4caf50")
|
HUNTING = ("hunt", "🎯 Hunting", "#4caf50")
|
||||||
MINING = ("mining", "⛏️ Mining", "#ff9800")
|
MINING = ("mine", "⛏️ Mining", "#ff9800")
|
||||||
CRAFTING = ("crafting", "⚒️ Crafting", "#2196f3")
|
CRAFTING = ("craft", "⚒️ Crafting", "#2196f3")
|
||||||
|
|
||||||
def __init__(self, value, display_name, color):
|
def __init__(self, value, display_name, color):
|
||||||
self._value_ = value
|
self._value_ = value
|
||||||
|
|
|
||||||
|
|
@ -262,9 +262,9 @@ class ActivityTypePage(QWizardPage):
|
||||||
# Activity type selection
|
# Activity type selection
|
||||||
form_layout = QFormLayout()
|
form_layout = QFormLayout()
|
||||||
self.activity_combo = QComboBox()
|
self.activity_combo = QComboBox()
|
||||||
self.activity_combo.addItem("🎯 Hunting", "hunting")
|
self.activity_combo.addItem("🎯 Hunting", "hunt")
|
||||||
self.activity_combo.addItem("⛏️ Mining", "mining")
|
self.activity_combo.addItem("⛏️ Mining", "mine")
|
||||||
self.activity_combo.addItem("⚒️ Crafting", "crafting")
|
self.activity_combo.addItem("⚒️ Crafting", "craft")
|
||||||
form_layout.addRow("Default Activity:", self.activity_combo)
|
form_layout.addRow("Default Activity:", self.activity_combo)
|
||||||
layout.addLayout(form_layout)
|
layout.addLayout(form_layout)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue