Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
flask-covid19
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
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Thomas Wöhlke
flask-covid19
Commits
4397d435
Commit
4397d435
authored
4 years ago
by
thomaswoehlke
Browse files
Options
Downloads
Patches
Plain Diff
work
parent
5febafd1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
org/woehlke/covid19/common/common_model.py
+1
-1
1 addition, 1 deletion
org/woehlke/covid19/common/common_model.py
org/woehlke/covid19/common/common_service.py
+2
-8
2 additions, 8 deletions
org/woehlke/covid19/common/common_service.py
with
3 additions
and
9 deletions
org/woehlke/covid19/common/common_model.py
+
1
−
1
View file @
4397d435
...
...
@@ -19,7 +19,7 @@ class CommonDatum(db.Model):
week_of_year
=
db
.
Column
(
db
.
Integer
,
nullable
=
True
)
@classmethod
def
create_
r
w_datum_factory
(
cls
,
date_string
):
def
create_
ne
w_datum_factory
(
cls
,
date_string
):
# check date_string syntax
# load if already exists
old
=
db
.
session
.
query
(
cls
).
filter
(
cls
.
date_string
==
date_string
).
one_or_none
()
...
...
This diff is collapsed.
Click to expand it.
org/woehlke/covid19/common/common_service.py
+
2
−
8
View file @
4397d435
import
os
from
database
import
app
from
org.woehlke.covid19.vaccination.vaccination_service_download
import
VaccinationServiceDownload
from
org.woehlke.covid19.vaccination.vaccination_service_import
import
VaccinationServiceImport
from
database
import
app
,
db
from
org.woehlke.covid19.common.common_model
import
CommonDatum
common_service
=
None
...
...
@@ -13,10 +12,5 @@ class CommonService:
app
.
logger
.
info
(
"
------------------------------------------------------------
"
)
self
.
__database
=
database
self
.
limit_nr
=
20
self
.
vaccination_service_download
=
VaccinationServiceDownload
(
database
)
self
.
vaccination_service_import
=
VaccinationServiceImport
(
database
)
app
.
logger
.
info
(
"
------------------------------------------------------------
"
)
app
.
logger
.
info
(
"
Common Service [ready]
"
)
def
add_new_datum
(
self
,
date_string
):
return
self
\ No newline at end of file
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