Spaces:
Running
Running
fix: update CaptureItem schema to match enriched frontend payload
Browse files
models.py
CHANGED
|
@@ -49,6 +49,8 @@ class CaptureItem:
|
|
| 49 |
quantity: float
|
| 50 |
unit: Literal['lbs', 'units']
|
| 51 |
customName: Optional[str] = None
|
|
|
|
|
|
|
| 52 |
|
| 53 |
def to_dict(self):
|
| 54 |
"""Convert to dictionary for JSON serialization."""
|
|
@@ -56,7 +58,9 @@ class CaptureItem:
|
|
| 56 |
'speciesId': self.speciesId,
|
| 57 |
'quantity': self.quantity,
|
| 58 |
'unit': self.unit,
|
| 59 |
-
'customName': self.customName
|
|
|
|
|
|
|
| 60 |
}
|
| 61 |
|
| 62 |
|
|
|
|
| 49 |
quantity: float
|
| 50 |
unit: Literal['lbs', 'units']
|
| 51 |
customName: Optional[str] = None
|
| 52 |
+
commonName: Optional[str] = None
|
| 53 |
+
category: Optional[str] = None
|
| 54 |
|
| 55 |
def to_dict(self):
|
| 56 |
"""Convert to dictionary for JSON serialization."""
|
|
|
|
| 58 |
'speciesId': self.speciesId,
|
| 59 |
'quantity': self.quantity,
|
| 60 |
'unit': self.unit,
|
| 61 |
+
'customName': self.customName,
|
| 62 |
+
'commonName': self.commonName,
|
| 63 |
+
'category': self.category
|
| 64 |
}
|
| 65 |
|
| 66 |
|