diff --git a/opensensor/collection_apis.py b/opensensor/collection_apis.py index 5e56042..4bd9a4c 100644 --- a/opensensor/collection_apis.py +++ b/opensensor/collection_apis.py @@ -457,7 +457,7 @@ async def record_environment( ): db = get_open_sensor_db() - # TODO - Refactor this after migration to FreeTier complete + # Paid customers may have their own collection if user: collection_name = user.collection_name else: diff --git a/opensensor/collections.py b/opensensor/collections.py index 0fad60d..43cf688 100644 --- a/opensensor/collections.py +++ b/opensensor/collections.py @@ -1,9 +1,9 @@ import json from datetime import datetime from decimal import Decimal -from typing import List +from typing import List, Optional -from pydantic import BaseModel, validator +from pydantic import BaseModel, Field, validator class TimestampModel(BaseModel): @@ -74,5 +74,5 @@ class VPD(BaseModel): """ timestamp: datetime - vpd: float + vpd: Optional[float] = Field(None, description="The computed VPD value.") unit: str