collab: Make metrics_id
required in LlmTokenClaims
(#21771)
This PR makes the `metrics_id` field on the `LlmTokenClaims` required, as we always have one in practice. Release Notes: - N/A
This commit is contained in:
parent
158cdc33ba
commit
8a85d6ef96
3 changed files with 5 additions and 7 deletions
|
@ -130,7 +130,7 @@ async fn update_billing_preferences(
|
|||
|
||||
SnowflakeRow::new(
|
||||
"Spend Limit Updated",
|
||||
Some(user.metrics_id),
|
||||
user.metrics_id,
|
||||
user.admin,
|
||||
None,
|
||||
json!({
|
||||
|
|
|
@ -1593,7 +1593,7 @@ pub struct SnowflakeRow {
|
|||
impl SnowflakeRow {
|
||||
pub fn new(
|
||||
event_type: impl Into<String>,
|
||||
metrics_id: Option<Uuid>,
|
||||
metrics_id: Uuid,
|
||||
is_staff: bool,
|
||||
system_id: Option<String>,
|
||||
event_properties: serde_json::Value,
|
||||
|
@ -1602,7 +1602,7 @@ impl SnowflakeRow {
|
|||
time: chrono::Utc::now(),
|
||||
event_type: event_type.into(),
|
||||
device_id: system_id,
|
||||
user_id: metrics_id.map(|id| id.to_string()),
|
||||
user_id: Some(metrics_id.to_string()),
|
||||
insert_id: Some(uuid::Uuid::new_v4().to_string()),
|
||||
event_properties,
|
||||
user_properties: Some(json!({"is_staff": is_staff})),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue