API v2.46, added 'is_default' field to share group types

Partial-Bug: #1823078
Change-Id: I3f2b4e6ebf715615b0f65cc26451f9ba406ba236
This commit is contained in:
haixin 2021-05-26 10:46:48 +08:00 committed by Goutham Pacha Ravi
parent 957240e778
commit 748b25f04f
2 changed files with 9 additions and 0 deletions

View File

@ -88,6 +88,10 @@ class ShareGroupTypesTable(tables.DataTable):
"is_public", verbose_name=_("Visibility"),
filters=(lambda d: 'public' if d is True else 'private', ),
)
is_default = tables.Column(
"is_default", verbose_name=_("Is default"),
filters=(lambda d: 'Yes' if d is True else '-', ),
)
def get_object_display(self, share_group_type):
return share_group_type.name

View File

@ -0,0 +1,5 @@
---
features:
- |
Adds is_default field to share group types list. the Is_default Column
will show 'Yes' if the share group type is default share group type.