Merge pull request #16041 from davelopez/fix_history_summary_schema

Add missing fields to HistorySummary schema model
This commit is contained in:
Laila Los
2023-05-05 12:18:29 +02:00
committed by GitHub
3 changed files with 22 additions and 5 deletions
+16
View File
@@ -4502,6 +4502,11 @@ export interface components {
* @description The name of the history.
*/
name: string;
/**
* Preferred Object Store ID
* @description The ID of the object store that should be used to store new datasets in this history.
*/
preferred_object_store_id?: string;
/**
* Published
* @description Whether this resource is currently publicly available to all users.
@@ -4604,6 +4609,11 @@ export interface components {
* @description The name of the history.
*/
name: string;
/**
* Preferred Object Store ID
* @description The ID of the object store that should be used to store new datasets in this history.
*/
preferred_object_store_id?: string;
/**
* Published
* @description Whether this resource is currently publicly available to all users.
@@ -4615,6 +4625,12 @@ export interface components {
*/
purged: boolean;
tags: components["schemas"]["TagCollection"];
/**
* Update Time
* Format: date-time
* @description The last time and date this item was updated.
*/
update_time: string;
/**
* URL
* @deprecated
-4
View File
@@ -572,7 +572,6 @@ class HistorySerializer(sharable.SharableModelSerializer, deletable.PurgableSeri
"size",
"user_id",
"create_time",
"update_time",
"importable",
"slug",
"username",
@@ -583,7 +582,6 @@ class HistorySerializer(sharable.SharableModelSerializer, deletable.PurgableSeri
"state_details",
"state_ids",
"hid_counter",
"preferred_object_store_id",
# 'community_rating',
# 'user_rating',
],
@@ -599,7 +597,6 @@ class HistorySerializer(sharable.SharableModelSerializer, deletable.PurgableSeri
"size",
"user_id",
"create_time",
"update_time",
"importable",
"slug",
"username_and_slug",
@@ -607,7 +604,6 @@ class HistorySerializer(sharable.SharableModelSerializer, deletable.PurgableSeri
# 'contents_states',
"contents_active",
"hid_counter",
"preferred_object_store_id",
],
include_keys_from="summary",
)
+6 -1
View File
@@ -975,6 +975,12 @@ class HistorySummary(HistoryBase):
)
annotation: Optional[str] = AnnotationField
tags: TagCollection
update_time: datetime = UpdateTimeField
preferred_object_store_id: Optional[str] = Field(
None,
title="Preferred Object Store ID",
description="The ID of the object store that should be used to store new datasets in this history.",
)
class HistoryActiveContentCounts(Model):
@@ -1016,7 +1022,6 @@ class HistoryDetailed(HistorySummary): # Equivalent to 'dev-detailed' view, whi
description="The encoded ID of the user that owns this History.",
)
create_time: datetime = CreateTimeField
update_time: datetime = UpdateTimeField
importable: bool = Field(
...,
title="Importable",