mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-10-03 17:15:19 -07:00
fix: convert the utcnow() calls added to CloudSettings since the PR was opened
This commit is contained in:
@@ -253,7 +253,7 @@ class CloudSettings(Base):
|
|||||||
device_name = Column(String, nullable=True)
|
device_name = Column(String, nullable=True)
|
||||||
account_user_id = Column(String, nullable=True)
|
account_user_id = Column(String, nullable=True)
|
||||||
connected_at = Column(DateTime, nullable=True)
|
connected_at = Column(DateTime, nullable=True)
|
||||||
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
|
updated_at = Column(DateTime, default=lambda: datetime.now(UTC), onupdate=lambda: datetime.now(UTC))
|
||||||
|
|
||||||
|
|
||||||
class MCPClientBinding(Base):
|
class MCPClientBinding(Base):
|
||||||
|
|||||||
@@ -140,13 +140,13 @@ def _get_or_create_row(db: Session) -> DBCloudSettings:
|
|||||||
|
|
||||||
|
|
||||||
def _store_key(db: Session, *, api_key: str, device_name: str | None, account_user_id: str | None):
|
def _store_key(db: Session, *, api_key: str, device_name: str | None, account_user_id: str | None):
|
||||||
from datetime import datetime
|
from datetime import UTC, datetime
|
||||||
|
|
||||||
row = _get_or_create_row(db)
|
row = _get_or_create_row(db)
|
||||||
row.api_key = api_key
|
row.api_key = api_key
|
||||||
row.device_name = device_name
|
row.device_name = device_name
|
||||||
row.account_user_id = account_user_id
|
row.account_user_id = account_user_id
|
||||||
row.connected_at = datetime.utcnow()
|
row.connected_at = datetime.now(UTC)
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user