Skip to content

Commit

Permalink
editoast: add UUID to work schedule group name
Browse files Browse the repository at this point in the history
Signed-off-by: hamz2a <atrari.hamza@gmail.com>
  • Loading branch information
hamz2a committed Oct 16, 2024
1 parent eca6a69 commit 6933fe5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion editoast/src/models/fixtures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use editoast_schemas::rolling_stock::RollingStock;
use editoast_schemas::train_schedule::TrainScheduleBase;
use postgis_diesel::types::LineString;
use serde_json::Value;
use uuid::Uuid;

use crate::infra_cache::operation::create::apply_create_operation;
use crate::models::electrical_profiles::ElectricalProfileSet;
Expand Down Expand Up @@ -288,7 +289,7 @@ pub async fn create_small_infra(conn: &mut DbConnection) -> Infra {

pub async fn create_work_schedule_group(conn: &mut DbConnection) -> WorkScheduleGroup {
WorkScheduleGroup::changeset()
.name("Empty work schedule group".to_string())
.name(format!("Empty work schedule group {}", Uuid::new_v4()).to_string())
.creation_date(Utc::now().naive_utc())
.create(conn)
.await
Expand Down
2 changes: 1 addition & 1 deletion editoast/src/views/work_schedules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ pub mod test {
let pool = app.db_pool();

let request = app.post("/work_schedules").json(&json!({
"work_schedule_group_name": "work schedule group name",
"work_schedule_group_name": "work schedule group name test create",
"work_schedules": [{
"start_date_time": "2024-01-01T08:00:00",
"end_date_time": "2024-01-01T09:00:00",
Expand Down

0 comments on commit 6933fe5

Please sign in to comment.