fixing erros
This commit is contained in:
@@ -529,7 +529,18 @@ pub(crate) async fn copy_profile(
|
||||
let request = CopyProfileRequest {
|
||||
source_profile_name: form.profile.clone(),
|
||||
target_profile_name: form.target_profile_name.trim().to_string(),
|
||||
table_names: form.table_names.clone(),
|
||||
// No table selected means the whole profile, which is what the hint
|
||||
// promises and what the server does with an empty list. A browser
|
||||
// sends no `table_names` key at all when nothing is ticked; anything
|
||||
// posting the field empty would otherwise send one blank name, and
|
||||
// the server rejects a blank name rather than reading it as "all".
|
||||
table_names: form
|
||||
.table_names
|
||||
.iter()
|
||||
.map(|name| name.trim())
|
||||
.filter(|name| !name.is_empty())
|
||||
.map(str::to_string)
|
||||
.collect(),
|
||||
};
|
||||
let Ok(request) = authenticated_request(&headers, request) else {
|
||||
return Redirect::to("/login").into_response();
|
||||
|
||||
Reference in New Issue
Block a user