fix(devices): restore warranty/maintenance dates missing from timestamp field list

subscrStart, warrantyStart, and maintainedOn are written to Firestore as
Timestamps like the other date fields here, but were missing from
_TIMESTAMP_FIELD_NAMES, so they weren't being converted back to ISO
strings on read.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-21 18:30:15 +03:00
co-authored by Claude Sonnet 5
parent 0bec4c4648
commit 8ec13947cb
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -141,6 +141,10 @@ class MelodyMainItem(BaseModel):
class DeviceCreate(BaseModel): class DeviceCreate(BaseModel):
device_name: str = "" device_name: str = ""
# Console-only friendly name — set by staff, independent of the name the
# end user gave the device in the app. Never shown to app users, never
# synced from/to device_name. Falls back to device_name when empty.
console_name: str = ""
device_photo: str = "" device_photo: str = ""
device_location: str = "" device_location: str = ""
is_Online: bool = False is_Online: bool = False
@@ -166,6 +170,7 @@ class DeviceCreate(BaseModel):
class DeviceUpdate(BaseModel): class DeviceUpdate(BaseModel):
device_name: Optional[str] = None device_name: Optional[str] = None
console_name: Optional[str] = None
device_photo: Optional[str] = None device_photo: Optional[str] = None
device_location: Optional[str] = None device_location: Optional[str] = None
is_Online: Optional[bool] = None is_Online: Optional[bool] = None
+1
View File
@@ -19,6 +19,7 @@ _TIMESTAMP_FIELD_NAMES = {
"daySilenceFrom", "daySilenceTo", "daySilenceFrom", "daySilenceTo",
"nightSilenceFrom", "nightSilenceTo", "nightSilenceFrom", "nightSilenceTo",
"backlightTurnOnTime", "backlightTurnOffTime", "backlightTurnOnTime", "backlightTurnOffTime",
"subscrStart", "warrantyStart", "maintainedOn",
} }