Skip to content

Commit

Permalink
core: download railjson without extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
younesschrifi committed Oct 31, 2022
1 parent 654b702 commit 781d7f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/osrd_infra/views/railjson.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@

def serialize_infra(infra: Infra, exclude_extensions: bool) -> str:
with connection.cursor() as cursor:
get_infra_sql = GET_INFRA_NO_EXT_SQL
get_infra_sql = GET_INFRA_WITH_EXT_SQL
if exclude_extensions:
get_infra_sql = GET_INFRA_WITH_EXT_SQL
get_infra_sql = GET_INFRA_NO_EXT_SQL
cursor.execute(get_infra_sql, [infra.id])
res = cursor.fetchone()[0]
return res
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/fr/sncf/osrd/api/InfraManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private SignalingInfra downloadInfra(
DiagnosticRecorder diagnosticRecorder
) throws InfraLoadException {
// create a request
var endpointUrl = String.format("%sinfra/%s/railjson/", baseUrl, infraId);
var endpointUrl = String.format("%sinfra/%s/railjson/?exclude_extensions=true", baseUrl, infraId);
var request = buildRequest(endpointUrl);

try {
Expand Down

0 comments on commit 781d7f8

Please sign in to comment.