Spaces:
Sleeping
Sleeping
Update data_models.py
Browse files- data_models.py +10 -1
data_models.py
CHANGED
@@ -22,10 +22,19 @@ class IdeaForm(BaseModel):
|
|
22 |
technical_challenges: Optional[str] = Field(None, description="Difficult technical problems")
|
23 |
legal_barriers: Optional[str] = Field(None, description="Possible legal issues")
|
24 |
data_dependencies: Optional[str] = Field(None, description="Required data types")
|
25 |
-
team_roles: Optional[List[str]] = Field(
|
26 |
timeline: Optional[str] = Field(None, description="Estimated time to build main components")
|
27 |
additional_info: Optional[str] = Field(None, description="Any additional information")
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
class InnovativeIdea(Base):
|
30 |
__tablename__ = 'innovative_ideas'
|
31 |
|
|
|
22 |
technical_challenges: Optional[str] = Field(None, description="Difficult technical problems")
|
23 |
legal_barriers: Optional[str] = Field(None, description="Possible legal issues")
|
24 |
data_dependencies: Optional[str] = Field(None, description="Required data types")
|
25 |
+
team_roles: Optional[List[str]] = Field(default_factory=list, description="Required job roles")
|
26 |
timeline: Optional[str] = Field(None, description="Estimated time to build main components")
|
27 |
additional_info: Optional[str] = Field(None, description="Any additional information")
|
28 |
|
29 |
+
class Config:
|
30 |
+
validate_assignment = True
|
31 |
+
|
32 |
+
@classmethod
|
33 |
+
def parse_team_roles(cls, value):
|
34 |
+
if isinstance(value, str):
|
35 |
+
return [role.strip() for role in value.split(',')] if value else []
|
36 |
+
return value
|
37 |
+
|
38 |
class InnovativeIdea(Base):
|
39 |
__tablename__ = 'innovative_ideas'
|
40 |
|