diff --git a/src/parseable/mod.rs b/src/parseable/mod.rs index 6e4f55e94..509125491 100644 --- a/src/parseable/mod.rs +++ b/src/parseable/mod.rs @@ -451,23 +451,17 @@ impl Parseable { .await; } - let time_partition_in_days = if !time_partition_limit.is_empty() { - Some(validate_time_partition_limit(&time_partition_limit)?) - } else { - None - }; - - if let Some(custom_partition) = &custom_partition { - validate_custom_partition(custom_partition)?; - } - - if !time_partition.is_empty() && custom_partition.is_some() { + if !time_partition.is_empty() || !time_partition_limit.is_empty() { return Err(StreamError::Custom { - msg: "Cannot set both time partition and custom partition".to_string(), + msg: "Creating stream with time partition is not supported anymore".to_string(), status: StatusCode::BAD_REQUEST, }); } + if let Some(custom_partition) = &custom_partition { + validate_custom_partition(custom_partition)?; + } + let schema = validate_static_schema( body, stream_name, @@ -479,7 +473,7 @@ impl Parseable { self.create_stream( stream_name.to_string(), &time_partition, - time_partition_in_days, + None, custom_partition.as_ref(), static_schema_flag, schema,