forked from phoenix/litellm-mirror
fix(teams.tsx): fix member add when role is 'user'
This commit is contained in:
parent
05b5a21014
commit
1413fdfc06
3 changed files with 20 additions and 3 deletions
|
@ -12,7 +12,20 @@ model_list:
|
|||
vertex_ai_project: "adroit-crow-413218"
|
||||
vertex_ai_location: "us-east5"
|
||||
|
||||
# litellm_settings:
|
||||
router_settings:
|
||||
routing_strategy: usage-based-routing-v2
|
||||
#redis_url: "os.environ/REDIS_URL"
|
||||
redis_host: "os.environ/REDIS_HOST"
|
||||
redis_port: "os.environ/REDIS_PORT"
|
||||
|
||||
litellm_settings:
|
||||
cache: true
|
||||
cache_params:
|
||||
type: redis
|
||||
host: "os.environ/REDIS_HOST"
|
||||
port: "os.environ/REDIS_PORT"
|
||||
namespace: "litellm.caching"
|
||||
ttl: 600
|
||||
# key_generation_settings:
|
||||
# team_key_generation:
|
||||
# allowed_team_member_roles: ["admin"]
|
||||
|
|
|
@ -1982,7 +1982,6 @@ class MemberAddRequest(LiteLLMBase):
|
|||
# Replace member_data with the single Member object
|
||||
data["member"] = member
|
||||
# Call the superclass __init__ method to initialize the object
|
||||
traceback.print_stack()
|
||||
super().__init__(**data)
|
||||
|
||||
|
||||
|
|
|
@ -413,6 +413,7 @@ const Team: React.FC<TeamProps> = ({
|
|||
selectedTeam["team_id"],
|
||||
user_role
|
||||
);
|
||||
message.success("Member added");
|
||||
console.log(`response for team create call: ${response["data"]}`);
|
||||
// Checking if the team exists in the list and updating or adding accordingly
|
||||
const foundIndex = teams.findIndex((team) => {
|
||||
|
@ -430,6 +431,7 @@ const Team: React.FC<TeamProps> = ({
|
|||
setSelectedTeam(response.data);
|
||||
}
|
||||
setIsAddMemberModalVisible(false);
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error creating the team:", error);
|
||||
|
@ -825,6 +827,9 @@ const Team: React.FC<TeamProps> = ({
|
|||
labelCol={{ span: 8 }}
|
||||
wrapperCol={{ span: 16 }}
|
||||
labelAlign="left"
|
||||
initialValues={{
|
||||
role: "user",
|
||||
}}
|
||||
>
|
||||
<>
|
||||
<Form.Item label="Email" name="user_email" className="mb-4">
|
||||
|
@ -842,8 +847,8 @@ const Team: React.FC<TeamProps> = ({
|
|||
</Form.Item>
|
||||
<Form.Item label="Member Role" name="role" className="mb-4">
|
||||
<Select2 defaultValue="user">
|
||||
<Select2.Option value="user">user</Select2.Option>
|
||||
<Select2.Option value="admin">admin</Select2.Option>
|
||||
<Select2.Option value="user">user</Select2.Option>
|
||||
</Select2>
|
||||
</Form.Item>
|
||||
</>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue