File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
src/globus_registered_api/commands/manage Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ def modify_role(self) -> None:
9595 )
9696
9797 role .access_level = access_level
98+ self .config .roles .sort (key = lambda r : r .sort_key )
9899 self .config .commit ()
99100
100101 def add_role (self ) -> None :
@@ -115,6 +116,7 @@ def add_role(self) -> None:
115116
116117 new_role = RoleConfig (type = role_type , id = entity_id , access_level = access_level )
117118 self .config .roles .append (new_role )
119+ self .config .roles .sort (key = lambda r : r .sort_key )
118120 self .config .commit ()
119121
120122 def remove_role (self ) -> None :
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ def modify_target(self) -> None:
8787 target = self ._target_prompter .prompt_for_config ()
8888 target .alias = click .prompt ("Target Alias" , type = str , default = target .alias )
8989 target .scope_strings = self ._scope_prompter .prompt_for_existing_target (target )
90+ self .config .targets .sort (key = lambda ta : ta .sort_key )
9091 self .config .commit ()
9192 self .display_target (target )
9293
@@ -106,6 +107,7 @@ def add_target(self) -> None:
106107 scope_strings = scope_strings ,
107108 )
108109 self .config .targets .append (target )
110+ self .config .targets .sort (key = lambda ta : ta .sort_key )
109111 self .config .commit ()
110112 self .display_target (target )
111113
You can’t perform that action at this time.
0 commit comments