Skip to content

Commit

Permalink
template for loop more clearly
Browse files Browse the repository at this point in the history
  • Loading branch information
JJFlorian committed Mar 18, 2024
1 parent c237974 commit c920ce8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions api/bro_upload/templates/move_GMN_StartRegistration.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<startDateMonitoring>
<brocom:date>{{ sourcedocs_data.startDateMonitoring }}</brocom:date>
</startDateMonitoring>
{% for measuringpoint in sourcedocs_data.measuringPoints %}
{% for measuringpoint in sourcedocs_data.measuringPoints %}
<measuringPoint>
<MeasuringPoint gml:id="id_0002">
<measuringPointCode>{{ measuringpoint.measuringPointCode }}</measuringPointCode>
Expand All @@ -30,7 +30,7 @@
</monitoringTube>
</MeasuringPoint>
</measuringPoint>
{% endfor %}
{% endfor %}
</GMN_StartRegistration>
</sourceDocument>
<dateToBeCorrected>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
<groundwaterAspect codeSpace="urn:bro:gmn:GroundwaterAspect">{{ sourcedocs_data.groundwaterAspect }}</groundwaterAspect>
<startDateMonitoring>
<brocom:date>{{ sourcedocs_data.startDateMonitoring }}</brocom:date>
</startDateMonitoring>{% for measuringpoint in sourcedocs_data.measuringPoints %}
</startDateMonitoring>
{% for measuringpoint in sourcedocs_data.measuringPoints %}
<measuringPoint>
<MeasuringPoint gml:id="measuringpoint_{{ forloop.counter }}">
<measuringPointCode>{{ measuringpoint.measuringPointCode }}</measuringPointCode>
Expand All @@ -25,7 +26,8 @@
</GroundwaterMonitoringTube>
</monitoringTube>
</MeasuringPoint>
</measuringPoint>{% endfor %}
</measuringPoint>
{% endfor %}
</GMN_StartRegistration>
</sourceDocument>
</registrationRequest>
6 changes: 4 additions & 2 deletions api/bro_upload/templates/replace_GMN_StartRegistration.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
<groundwaterAspect codeSpace="urn:bro:gmn:GroundwaterAspect">{{ sourcedocs_data.groundwaterAspect }}</groundwaterAspect>
<startDateMonitoring>
<brocom:date>{{ sourcedocs_data.startDateMonitoring }}</brocom:date>
</startDateMonitoring>{% for measuringpoint in sourcedocs_data.measuringPoints %}
</startDateMonitoring>
{% for measuringpoint in sourcedocs_data.measuringPoints %}
<measuringPoint>
<MeasuringPoint gml:id="measuringpoint_{{ forloop.counter }}">
<measuringPointCode>{{ measuringpoint.measuringPointCode }}</measuringPointCode>
Expand All @@ -27,7 +28,8 @@
</GroundwaterMonitoringTube>
</monitoringTube>
</MeasuringPoint>
</measuringPoint>{% endfor %}
</measuringPoint>
{% endfor %}
</GMN_StartRegistration>
</sourceDocument>
</replaceRequest>
3 changes: 3 additions & 0 deletions api/tests/test_bro_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<startDateMonitoring>
<brocom:date>2024-01-01</brocom:date>
</startDateMonitoring>
<measuringPoint>
<MeasuringPoint gml:id="measuringpoint_1">
<measuringPointCode>GMW000000038946</measuringPointCode>
Expand All @@ -30,6 +31,7 @@
</monitoringTube>
</MeasuringPoint>
</measuringPoint>
<measuringPoint>
<MeasuringPoint gml:id="measuringpoint_2">
<measuringPointCode>GMW000000038946</measuringPointCode>
Expand All @@ -41,6 +43,7 @@
</monitoringTube>
</MeasuringPoint>
</measuringPoint>
</GMN_StartRegistration>
</sourceDocument>
</registrationRequest>
Expand Down

0 comments on commit c920ce8

Please sign in to comment.