Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
compendium-v2
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
geant-swd
compendium-v2
Commits
87486218
Commit
87486218
authored
2 years ago
by
Bjarke Madsen
Browse files
Options
Downloads
Patches
Plain Diff
use sqlalchemy text for queries
parent
3d5a20d4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compendium_v2/publishers/survey_publisher_2022.py
+3
-2
3 additions, 2 deletions
compendium_v2/publishers/survey_publisher_2022.py
with
3 additions
and
2 deletions
compendium_v2/publishers/survey_publisher_2022.py
+
3
−
2
View file @
87486218
...
...
@@ -3,6 +3,7 @@ import click
import
enum
import
math
from
sqlalchemy
import
text
from
compendium_v2.environment
import
setup_logging
from
compendium_v2.config
import
load
from
compendium_v2
import
db
,
survey_db
...
...
@@ -60,7 +61,7 @@ def setup_db(config):
def
transfer_budget
():
with
db
.
session_scope
()
as
session
,
survey_db
.
session_scope
()
as
survey
:
rows
=
survey
.
execute
(
BUDGET_QUERY
)
rows
=
survey
.
execute
(
text
(
BUDGET_QUERY
)
)
for
row
in
rows
:
nren
=
row
[
'
nren
'
]
_budget
=
row
[
'
budget
'
]
...
...
@@ -91,7 +92,7 @@ def transfer_funding_sources():
for
source
in
FundingSource
:
data
=
survey
.
execute
(
FUNDING_SOURCES_TEMPLATE_QUERY
.
format
(
source
.
value
))
text
(
FUNDING_SOURCES_TEMPLATE_QUERY
.
format
(
source
.
value
))
)
for
row
in
data
:
nren
=
row
[
'
nren
'
]
nrens
.
add
(
nren
)
...
...
This diff is collapsed.
Click to expand it.
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