mirror of
https://github.com/langgenius/dify.git
synced 2026-09-24 23:22:26 +08:00
fix(workspace): expose last opened in contract (#38323)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -102,6 +102,7 @@ class TenantListItemResponse(ResponseModel):
|
||||
plan: str | None = None
|
||||
status: str | None = None
|
||||
created_at: int | None = None
|
||||
last_opened_at: int | None = None
|
||||
current: bool
|
||||
|
||||
@field_validator("plan", "status", mode="before")
|
||||
@@ -113,9 +114,9 @@ class TenantListItemResponse(ResponseModel):
|
||||
return value
|
||||
return str(getattr(value, "value", value))
|
||||
|
||||
@field_validator("created_at", mode="before")
|
||||
@field_validator("created_at", "last_opened_at", mode="before")
|
||||
@classmethod
|
||||
def _normalize_created_at(cls, value: datetime | int | None):
|
||||
def _normalize_timestamp(cls, value: datetime | int | None):
|
||||
return to_timestamp(value)
|
||||
|
||||
|
||||
|
||||
@@ -21199,6 +21199,7 @@ Tag type
|
||||
| created_at | integer | | No |
|
||||
| current | boolean | | Yes |
|
||||
| id | string | | Yes |
|
||||
| last_opened_at | integer | | No |
|
||||
| name | string | | No |
|
||||
| plan | string | | No |
|
||||
| status | string | | No |
|
||||
|
||||
Reference in New Issue
Block a user