table name
This commit is contained in:
@@ -224,7 +224,10 @@ impl TableDraft {
|
||||
) {
|
||||
self.relation_table_options = options
|
||||
.into_iter()
|
||||
.filter(|option| option.name != self.table_name)
|
||||
.filter(|option| {
|
||||
common::alias::canonical_table_name(&option.name)
|
||||
!= common::alias::canonical_table_name(&self.table_name)
|
||||
})
|
||||
.collect();
|
||||
self.relation_tables = self
|
||||
.relation_table_options
|
||||
@@ -399,7 +402,10 @@ impl TableDraft {
|
||||
&& self
|
||||
.existing_profile_tables
|
||||
.iter()
|
||||
.any(|name| name == &self.table_name)
|
||||
.any(|name| {
|
||||
common::alias::canonical_table_name(name)
|
||||
== common::alias::canonical_table_name(&self.table_name)
|
||||
})
|
||||
}
|
||||
|
||||
/// Position of `column` among the display columns, counting from 1.
|
||||
|
||||
@@ -71,7 +71,7 @@ pub(crate) async fn load_page(
|
||||
// for, so it is told what that table is on every render rather than left to
|
||||
// read a copy that a `refresh` could have moved on from.
|
||||
draft.columns.global = draft.global;
|
||||
draft.columns.table_name = draft.table_name.trim().to_ascii_lowercase();
|
||||
draft.columns.table_name = draft.table_name.trim().to_string();
|
||||
|
||||
let tree = definitions
|
||||
.get_profile_tree(
|
||||
|
||||
@@ -140,7 +140,7 @@ impl BuilderForm {
|
||||
// takes no column that posts to one profile's books, and no link
|
||||
// may point at the table being created.
|
||||
global: self.global,
|
||||
table_name: self.table_name.trim().to_ascii_lowercase(),
|
||||
table_name: self.table_name.trim().to_string(),
|
||||
};
|
||||
|
||||
// Drop display columns whose column is gone, so a stale post cannot
|
||||
|
||||
Reference in New Issue
Block a user