Skip to content

Commit

Permalink
fix small enterprise-taxonomy scoped q typo; prep for conditional Use…
Browse files Browse the repository at this point in the history
…r join
  • Loading branch information
eli-r-ph committed Feb 26, 2025
1 parent b29f794 commit 0064921
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rust/property-defs-rs/src/api/v1/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl Manager {
if params.use_enterprise_taxonomy {
// borrowed from EnterprisePropertyDefinition from Django monolith
// via EnterprisePropertyDefinition._meta.get_fields()
qb.push(" id, project_id, team_id, name, is_numerical, property_type, type, group_type_index, property_type_format, description, updated_at, updated_by, verified_at, verified_by ");
qb.push(" id, project_id, team_id, name, is_numerical, property_type, type, group_type_index, property_type_format, description, updated_at, updated_by_id, verified_at, verified_by_id ");
} else {
// borrowed from Django monolith via PropertyDefinition._meta.get_fields()
qb.push(" id, project_id team_id, name, is_numerical, property_type, type, group_type_index, property_type_format ");
Expand Down
10 changes: 6 additions & 4 deletions rust/property-defs-rs/src/api/v1/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,20 +339,21 @@ pub struct PropDef {
// enterprise prop defs only fields below
#[serde(default)]
updated_at: Option<DateTime<Utc>>,
//#[serde(default)]
//updated_by: User,
#[serde(default)]
updated_by_id: Option<i64>, // TODO: when available, JOIN in the User record instead!
#[serde(default)]
verified: Option<bool>,
#[serde(default)]
verified_at: Option<DateTime<Utc>>,
//#[serde(default)]
//verified_by: User,
#[serde(default)]
verified_by_id: Option<i64>, // TODO: when available, JOIN in the User record instead!
#[serde(default)]
description: Option<String>,
#[serde(default)]
tags: Vec<String>,
}

// TODO: hydrate User(s) JOINed into prop defs query into this
#[derive(Serialize, FromRow)]
pub struct User {
id: u32,
Expand All @@ -365,6 +366,7 @@ pub struct User {
hedgehog_config: HedgehogConfig,
}

// TODO: optionally include when prop defs query JOINs in User records
#[derive(Serialize, FromRow)]
pub struct HedgehogConfig {
use_as_profile: bool,
Expand Down

0 comments on commit 0064921

Please sign in to comment.