Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TOAR-II FastAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esde
toar-data
TOAR-II FastAPI
Commits
02ba89f6
Commit
02ba89f6
authored
4 years ago
by
Sabine Schröder
Browse files
Options
Downloads
Patches
Plain Diff
#21
: bug fix (this is a workaraound for related crashs)
parent
ed5aab53
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#47320
passed
4 years ago
Stage: deploy
Stage: pages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
toardb/timeseries/crud.py
+3
-1
3 additions, 1 deletion
toardb/timeseries/crud.py
with
3 additions
and
1 deletion
toardb/timeseries/crud.py
+
3
−
1
View file @
02ba89f6
...
...
@@ -6,6 +6,7 @@ Create, Read, Update, Delete functionality
from
sqlalchemy
import
insert
from
sqlalchemy.orm
import
Session
from
geoalchemy2.elements
import
WKBElement
,
WKTElement
from
fastapi.responses
import
JSONResponse
from
.
import
models
from
.models
import
timeseries_timeseries_roles_table
,
\
...
...
@@ -34,7 +35,8 @@ def get_all_timeseries(db: Session, skip : int = 0, limit: int = None):
# there is a mismatch with additional_metadata
db_object
.
additional_metadata
=
str
(
db_object
.
additional_metadata
).
replace
(
"'"
,
'"'
)
# there is also a mismatch with coordinates and additional_metadata from station object
db_object
.
station
.
coordinates
=
get_coordinates_from_geom
(
db_object
.
station
.
coordinates
)
if
isinstance
(
db_object
.
station
.
coordinates
,
(
WKBElement
,
WKTElement
)):
db_object
.
station
.
coordinates
=
get_coordinates_from_geom
(
db_object
.
station
.
coordinates
)
db_object
.
station
.
additional_metadata
=
str
(
db_object
.
station
.
additional_metadata
).
replace
(
"'"
,
'"'
)
return
db_objects
...
...
This diff is collapsed.
Click to expand it.
Sabine Schröder
@schroeder5
mentioned in issue
#21 (closed)
·
4 years ago
mentioned in issue
#21 (closed)
mentioned in issue #21
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment