wip reciprocal relation names
This commit is contained in:
@@ -168,6 +168,7 @@ fn init_yopa() -> YopaStoreWrapper {
|
||||
id: Default::default(),
|
||||
object: id_recipe,
|
||||
name: "book reference".to_string(),
|
||||
reciprocal_name: "recipes".to_string(),
|
||||
optional: true,
|
||||
multiple: true,
|
||||
related: id_book
|
||||
@@ -187,6 +188,7 @@ fn init_yopa() -> YopaStoreWrapper {
|
||||
id: Default::default(),
|
||||
object: id_recipe,
|
||||
name: "related recipe".to_string(),
|
||||
reciprocal_name: "related recipe".to_string(),
|
||||
optional: true,
|
||||
multiple: true,
|
||||
related: id_recipe
|
||||
|
||||
@@ -178,6 +178,7 @@ pub(crate) async fn relation_model_create_form(
|
||||
pub(crate) struct RelationModelCreate {
|
||||
pub object : ID,
|
||||
pub name : String,
|
||||
pub reciprocal_name : String,
|
||||
pub optional : Option<i32>,
|
||||
pub multiple : Option<i32>,
|
||||
pub related : ID,
|
||||
@@ -195,6 +196,7 @@ pub(crate) async fn relation_model_create(
|
||||
id: Default::default(),
|
||||
object: form.object,
|
||||
name: form.name.clone(),
|
||||
reciprocal_name: form.reciprocal_name.clone(),
|
||||
optional: form.optional.unwrap_or_default() != 0,
|
||||
multiple: form.multiple.unwrap_or_default() != 0,
|
||||
related: form.related
|
||||
|
||||
Reference in New Issue
Block a user