From 7a1ae50016c6208a3a245aaa4b60de0bf1bb053a Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Mon, 26 May 2025 17:48:16 +0200 Subject: [PATCH] Update create_time field to be required in history contents I don't remember exactly why this was set to optional, but It seems the default of the database field will always be datetime.now so it makes more sense to make the value required. --- client/src/api/schema/schema.ts | 15 ++++++++++----- lib/galaxy/schema/schema.py | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/client/src/api/schema/schema.ts b/client/src/api/schema/schema.ts index a61861be3eaf..a3d36d5cf2a1 100644 --- a/client/src/api/schema/schema.ts +++ b/client/src/api/schema/schema.ts @@ -11513,9 +11513,10 @@ export interface components { copied_from_ldda_id?: string | null; /** * Create Time + * Format: date-time * @description The time and date this item was created. */ - create_time: string | null; + create_time: string; /** * Created from basename * @description The basename of the output that produced this dataset. @@ -11746,9 +11747,10 @@ export interface components { copied_from_ldda_id?: string | null; /** * Create Time + * Format: date-time * @description The time and date this item was created. */ - create_time: string | null; + create_time: string; /** * Deleted * @description Whether this item is marked as deleted. @@ -11865,9 +11867,10 @@ export interface components { copied_from_ldda_id?: string | null; /** * Create Time + * Format: date-time * @description The time and date this item was created. */ - create_time: string | null; + create_time: string; /** * Dataset ID * @description The encoded ID of the dataset associated with this item. @@ -12112,9 +12115,10 @@ export interface components { contents_url: string; /** * Create Time + * Format: date-time * @description The time and date this item was created. */ - create_time: string | null; + create_time: string; /** * Deleted * @description Whether this item is marked as deleted. @@ -12255,9 +12259,10 @@ export interface components { contents_url: string; /** * Create Time + * Format: date-time * @description The time and date this item was created. */ - create_time: string | null; + create_time: string; /** * Deleted * @description Whether this item is marked as deleted. diff --git a/lib/galaxy/schema/schema.py b/lib/galaxy/schema/schema.py index 9067ad02a0ba..3d7e7ab6d0b4 100644 --- a/lib/galaxy/schema/schema.py +++ b/lib/galaxy/schema/schema.py @@ -669,7 +669,7 @@ class HistoryItemCommon(HistoryItemBase): title="Type", description="The type of this item.", ) - create_time: Optional[datetime] = CreateTimeField + create_time: datetime = CreateTimeField update_time: Optional[datetime] = UpdateTimeField url: RelativeUrlField tags: TagCollection