Browse Source

fix: flag check bug in bitwise ops

pull/7452/head
Raphaël Roumezin 17 hours ago
parent
commit
a624aeceb5
  1. 2
      src/db/models/organization.rs

2
src/db/models/organization.rs

@ -43,7 +43,7 @@ pub struct OrganizationCollectionSettings(i16);
impl OrganizationCollectionSettings { impl OrganizationCollectionSettings {
pub fn get_flag(self, flag: OrgCollectionSetting) -> bool { pub fn get_flag(self, flag: OrgCollectionSetting) -> bool {
(self.0 | flag as i16) > 0 (self.0 & flag as i16) > 0
} }
pub fn set_flag(&mut self, flag: OrgCollectionSetting, val: bool) { pub fn set_flag(&mut self, flag: OrgCollectionSetting, val: bool) {

Loading…
Cancel
Save