Skip to content

Commit

Permalink
allow null VPD
Browse files Browse the repository at this point in the history
  • Loading branch information
matteius committed Oct 29, 2023
1 parent ab43ae5 commit a60cd29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion opensensor/collection_apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions opensensor/collections.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down Expand Up @@ -74,5 +74,5 @@ class VPD(BaseModel):
"""

timestamp: datetime
vpd: float
vpd: Optional[float] = Field(None, description="The computed VPD value.")
unit: str

0 comments on commit a60cd29

Please sign in to comment.