-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feat-import/support-constant
- Loading branch information
Showing
72 changed files
with
1,746 additions
and
635 deletions.
There are no files selected for viewing
Submodule UsersHub
updated
3 files
+1 −1 | VERSION | |
+7 −5 | app/bib_organismes/forms.py | |
+7 −0 | docs/changelog.rst |
Submodule UsersHub-authentification-module
updated
4 files
+1 −1 | VERSION | |
+21 −11 | docs/changelog.rst | |
+1 −0 | src/pypnusershub/db/models.py | |
+8 −11 | src/pypnusershub/routes.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from flask import Blueprint, request | ||
from geojson import FeatureCollection | ||
from geonature.core.gn_monitoring.models import TBaseSites, corSiteArea, corSiteModule | ||
from geonature.core.gn_monitoring.models import TBaseSites, cor_site_area, cor_site_module | ||
from geonature.utils.env import DB | ||
from ref_geo.models import LAreas | ||
from sqlalchemy import select | ||
|
@@ -79,17 +79,16 @@ def get_site_areas(id_site): | |
params = request.args | ||
|
||
query = ( | ||
# [email protected]_4326 | ||
select(corSiteArea, func.ST_Transform(LAreas.geom, 4326)) | ||
.join(LAreas, LAreas.id_area == corSiteArea.c.id_area) | ||
.where(corSiteArea.c.id_base_site == id_site) | ||
select(cor_site_area, func.ST_Transform(LAreas.geom, 4326)) | ||
.join(LAreas, LAreas.id_area == cor_site_area.c.id_area) | ||
.where(cor_site_area.c.id_base_site == id_site) | ||
) | ||
|
||
if "id_area_type" in params: | ||
query = query.where(LAreas.id_type == params["id_area_type"]) | ||
if "id_module" in params: | ||
query = query.join(corSiteModule, corSiteModule.c.id_base_site == id_site).where( | ||
corSiteModule.c.id_module == params["id_module"] | ||
query = query.join(cor_site_module, cor_site_module.c.id_base_site == id_site).where( | ||
cor_site_module.c.id_module == params["id_module"] | ||
) | ||
|
||
data = DB.session.scalars(query).all() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.