Skip to content

Commit

Permalink
front: editor: fix wrong id when updating a signal
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahBellaha committed Oct 30, 2023
1 parent 356c251 commit c5fdf08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion front/src/applications/editor/data/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export function entityToCreateOperation(entity: EditorEntity): RailjsonObject {
export function entityToUpdateOperation(entity: EditorEntity, prev: EditorEntity): UpdateOperation {
return {
operation_type: 'UPDATE',
obj_id: prev.properties.id,
obj_id: entity.properties.id,
obj_type: prev.objType,
railjson_patch: compare(
prev.properties || {},
Expand Down
2 changes: 1 addition & 1 deletion front/src/applications/editor/tools/pointEdition/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
NULL_GEOMETRY,
SignalEntity,
SignalingSystem,
} from '../../../../types';
} from 'types';
import { NEW_ENTITY_ID } from '../../data/utils';

export function getNewSignal(point?: [number, number]): SignalEntity {
Expand Down

0 comments on commit c5fdf08

Please sign in to comment.