Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Commit

Permalink
fix bad merge
Browse files Browse the repository at this point in the history
  • Loading branch information
neilkakkar committed Jun 10, 2024
1 parent ea8b996 commit f25c63e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion feature-flags/src/flag_definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub const TEAM_FLAGS_CACHE_PREFIX: &str = "posthog:1:team_feature_flags_";
#[derive(Debug, Deserialize)]
pub enum GroupTypeIndex {}

#[derive(Debug, Clone, Deserialize)]
#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum OperatorType {
Exact,
Expand Down
12 changes: 5 additions & 7 deletions feature-flags/src/property_matching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@ pub fn match_property(
// only looks for matches where key exists in override_property_values
// doesn't support operator is_not_set with partial_props

if partial_props {
if !matching_property_values.contains_key(&property.key) {
return Err(FlagMatchingError::MissingProperty(format!(
"can't match properties without a value. Missing property: {}",
property.key
)));
}
if partial_props && !matching_property_values.contains_key(&property.key) {
return Err(FlagMatchingError::MissingProperty(format!(
"can't match properties without a value. Missing property: {}",
property.key
)));
}

let key = &property.key;
Expand Down

0 comments on commit f25c63e

Please sign in to comment.