diff --git a/src/model/user.rs b/src/model/user.rs index 4e1af76..1769eeb 100644 --- a/src/model/user.rs +++ b/src/model/user.rs @@ -104,7 +104,6 @@ pub enum LoginError { pub(crate) struct Fee { pub(crate) sum_in_cents: i32, pub(crate) parts: Vec<(String, i32)>, - pub(crate) family: bool, pub(crate) name: String, } @@ -118,10 +117,6 @@ impl Fee { } } - pub fn family(&mut self) { - self.family = true; - } - pub fn add(&mut self, desc: String, price_in_cents: i32) { self.sum_in_cents += price_in_cents; @@ -149,7 +144,6 @@ impl User { if let Some(family) = Family::find_by_opt_id(db, self.family_id).await { fee.name(format!("{} + Familie", self.name)); - fee.family(); for member in family.members(db).await { fee.merge(member.fee_without_families(db).await); }