versioning of FK for archiving
This commit is contained in:
@@ -60,7 +60,26 @@ pub(crate) async fn load_page(
|
||||
.into_inner();
|
||||
|
||||
let effective_profile = draft.effective_profile_name();
|
||||
match tree
|
||||
if draft.global {
|
||||
let global_tables = tree
|
||||
.profiles
|
||||
.iter()
|
||||
.flat_map(|profile| profile.tables.iter())
|
||||
.filter(|table| table.global)
|
||||
.map(|table| table.name.clone())
|
||||
.collect::<std::collections::BTreeSet<_>>()
|
||||
.into_iter()
|
||||
.collect::<Vec<_>>();
|
||||
draft.existing_profile_tables = tree
|
||||
.profiles
|
||||
.iter()
|
||||
.flat_map(|profile| profile.tables.iter())
|
||||
.map(|table| table.name.clone())
|
||||
.collect::<std::collections::BTreeSet<_>>()
|
||||
.into_iter()
|
||||
.collect();
|
||||
draft.set_available_relation_tables(global_tables);
|
||||
} else { match tree
|
||||
.profiles
|
||||
.iter()
|
||||
.find(|profile| profile.name == effective_profile)
|
||||
@@ -82,7 +101,7 @@ pub(crate) async fn load_page(
|
||||
draft.existing_profile_tables.clear();
|
||||
draft.relation_tables.clear();
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
Ok(AddTablePageState {
|
||||
nav: crate::ui::Nav::new(headers, "admin").with_authorization(&authorization),
|
||||
|
||||
Reference in New Issue
Block a user