-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
editoast: add 'locked' to the schema definition of rolling stock #9024
Conversation
In the schema definition in Python, the field `locked` exists. However, it doesn't exist in the corresponding `editoast` implementation. Signed-off-by: Jean SIMARD <[email protected]>
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #9024 +/- ##
=========================================
Coverage 37.07% 37.07%
Complexity 2241 2241
=========================================
Files 1262 1262
Lines 115972 115974 +2
Branches 3277 3277
=========================================
+ Hits 42994 42995 +1
- Misses 71024 71025 +1
Partials 1954 1954
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
However I'm not sure it makes a lot of sense to have a locked
field in the schemas at all. The field (which also exists for infrastructures) exists to prevent modification of the resource. When the permission system will be up these fields are likely to disappear since they're functionally equivalent to a share at the READ
privilege level. That's why from a separation of concerns perspective I'm not sure we want to expose our current lack of resource control in the schemas. Maybe @flomonster has a better overview of the subject.
In any case, there shouldn't be any mismatch between osrd_schemas
and editoast_schemas
one way or the other.
You are right, the locked field will disappear with the permission system. The reason we did not expose this field is because the RS editor does not permit to edit it. It is only used during the import. |
Does that mean that in the meantime, we're ok with the difference between |
I prefer to merge this PR and try to make |
Since #9024, this is required to be able to use: ```sh ./scripts/load-railjson-rolling-stock.sh tests/data/rolling_stocks/fast_rolling_stock.json ```
Since #9024, this is required to be able to use: ```sh ./scripts/load-railjson-rolling-stock.sh tests/data/rolling_stocks/fast_rolling_stock.json ``` Signed-off-by: Pierre-Etienne Bougué <[email protected]>
Since #9024, this is required to be able to use: ```sh ./scripts/load-railjson-rolling-stock.sh tests/data/rolling_stocks/fast_rolling_stock.json ``` Signed-off-by: Pierre-Etienne Bougué <[email protected]>
In the schema definition in Python, the field
locked
exists. However, it doesn't exist in the correspondingeditoast
implementation.