Skip to content

Commit

Permalink
Improve quota field types in schema
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed Aug 5, 2024
1 parent 5baa77b commit 5a3d8cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions client/src/api/schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2187,7 +2187,7 @@ export interface components {
* Quota percent
* @description Percentage of the storage quota applicable to the user.
*/
quota_percent?: unknown;
quota_percent?: number | null;
/**
* Total disk usage
* @description Size of all non-purged, unique datasets of the user in bytes.
Expand Down Expand Up @@ -4613,12 +4613,12 @@ export interface components {
* Quota in bytes
* @description Quota applicable to the user in bytes.
*/
quota_bytes: unknown;
quota_bytes?: number | null;
/**
* Quota percent
* @description Percentage of the storage quota applicable to the user.
*/
quota_percent?: unknown;
quota_percent?: number | null;
/**
* Tags used
* @description Tags used by the user
Expand Down
6 changes: 4 additions & 2 deletions lib/galaxy/schema/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ class CreatedUserModel(UserModel, DiskUsageUserModel):


class AnonUserModel(DiskUsageUserModel):
quota_percent: Any = QuotaPercentField
quota_percent: Optional[float] = QuotaPercentField


class DetailedUserModel(BaseUserModel, AnonUserModel):
Expand All @@ -371,7 +371,9 @@ class DetailedUserModel(BaseUserModel, AnonUserModel):
preferences: Dict[Any, Any] = Field(default=..., title="Preferences", description="Preferences of the user")
preferred_object_store_id: Optional[str] = PreferredObjectStoreIdField
quota: str = Field(default=..., title="Quota", description="Quota applicable to the user")
quota_bytes: Any = Field(default=..., title="Quota in bytes", description="Quota applicable to the user in bytes.")
quota_bytes: Optional[int] = Field(
default=None, title="Quota in bytes", description="Quota applicable to the user in bytes."
)
tags_used: List[str] = Field(default=..., title="Tags used", description="Tags used by the user")


Expand Down

0 comments on commit 5a3d8cb

Please sign in to comment.