Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions spp_api_v2_gis/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ Dependencies
Changelog
=========

19.0.2.0.2
~~~~~~~~~~

- test(api_v2_gis): the "export with no data raises" test deactivates
every ``spp.gis.report`` and ``spp.gis.geofence`` in the database, not
only the ones it created. With an empty ``layer_ids`` the export
collects all active reports, and a demo module in the same database
(``spp_mis_demo_v2`` ships four report records as data) supplied
layers, so the expected error never came. No behaviour change (#443)

19.0.2.0.1
~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion spp_api_v2_gis/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"name": "OpenSPP GIS API",
"category": "OpenSPP/Integration",
"version": "19.0.2.0.1",
"version": "19.0.2.0.2",
"sequence": 1,
"author": "OpenSPP.org",
"website": "https://github.com/OpenSPP/OpenSPP2",
Expand Down
4 changes: 4 additions & 0 deletions spp_api_v2_gis/readme/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 19.0.2.0.2

- test(api_v2_gis): the "export with no data raises" test deactivates every `spp.gis.report` and `spp.gis.geofence` in the database, not only the ones it created. With an empty `layer_ids` the export collects all active reports, and a demo module in the same database (`spp_mis_demo_v2` ships four report records as data) supplied layers, so the expected error never came. No behaviour change (#443)

### 19.0.2.0.1

- fix: bind coordinate query parameters in the order the SQL expects
Expand Down
30 changes: 21 additions & 9 deletions spp_api_v2_gis/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -564,18 +564,30 @@ <h1>Dependencies</h1>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#changelog" id="toc-entry-1">Changelog</a><ul>
<li><a class="reference internal" href="#section-1" id="toc-entry-2">19.0.2.0.1</a></li>
<li><a class="reference internal" href="#section-2" id="toc-entry-3">19.0.2.0.0</a></li>
<li><a class="reference internal" href="#section-1" id="toc-entry-2">19.0.2.0.2</a></li>
<li><a class="reference internal" href="#section-2" id="toc-entry-3">19.0.2.0.1</a></li>
<li><a class="reference internal" href="#section-3" id="toc-entry-4">19.0.2.0.0</a></li>
</ul>
</li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-4">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-5">Credits</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-5">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-6">Credits</a></li>
</ul>
</div>
<div class="section" id="changelog">
<h2><a class="toc-backref" href="#toc-entry-1">Changelog</a></h2>
<div class="section" id="section-1">
<h3><a class="toc-backref" href="#toc-entry-2">19.0.2.0.1</a></h3>
<h3><a class="toc-backref" href="#toc-entry-2">19.0.2.0.2</a></h3>
<ul class="simple">
<li>test(api_v2_gis): the “export with no data raises” test deactivates
every <tt class="docutils literal">spp.gis.report</tt> and <tt class="docutils literal">spp.gis.geofence</tt> in the database, not
only the ones it created. With an empty <tt class="docutils literal">layer_ids</tt> the export
collects all active reports, and a demo module in the same database
(<tt class="docutils literal">spp_mis_demo_v2</tt> ships four report records as data) supplied
layers, so the expected error never came. No behaviour change (#443)</li>
</ul>
</div>
<div class="section" id="section-2">
<h3><a class="toc-backref" href="#toc-entry-3">19.0.2.0.1</a></h3>
<ul class="simple">
<li>fix: bind coordinate query parameters in the order the SQL expects</li>
<li>fix: run the coordinate statistics query inside a savepoint so the
Expand All @@ -593,23 +605,23 @@ <h3><a class="toc-backref" href="#toc-entry-2">19.0.2.0.1</a></h3>
re-land)</li>
</ul>
</div>
<div class="section" id="section-2">
<h3><a class="toc-backref" href="#toc-entry-3">19.0.2.0.0</a></h3>
<div class="section" id="section-3">
<h3><a class="toc-backref" href="#toc-entry-4">19.0.2.0.0</a></h3>
<ul class="simple">
<li>Initial migration to OpenSPP2</li>
</ul>
</div>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h2>
<h2><a class="toc-backref" href="#toc-entry-5">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OpenSPP/OpenSPP2/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OpenSPP/OpenSPP2/issues/new?body=module:%20spp_api_v2_gis%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h2><a class="toc-backref" href="#toc-entry-5">Credits</a></h2>
<h2><a class="toc-backref" href="#toc-entry-6">Credits</a></h2>
</div>
</div>
<div class="section" id="authors">
Expand Down
13 changes: 6 additions & 7 deletions spp_api_v2_gis/tests/test_export_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,12 @@ def test_export_no_data_raises_error(self):

service = ExportService(self.env)

# Deactivate all reports
self.report1.active = False
self.report2.active = False

# Deactivate all geofences
self.geofence1.active = False
self.geofence2.active = False
# Deactivate every report and geofence, not just this test's own: an
# empty layer_ids means "all active reports", and a demo module in the
# same database (spp_mis_demo_v2 ships four spp.gis.report records as
# data) would otherwise supply layers. Rolled back with the test.
self.env["spp.gis.report"].search([]).write({"active": False})
self.env["spp.gis.geofence"].search([]).write({"active": False})

with self.assertRaises(ValueError) as context:
service.export_geopackage(
Expand Down
Loading