Skip to content
Snippets Groups Projects
Commit d36a85bc authored by thomaswoehlke's avatar thomaswoehlke
Browse files

Refactoring: vaccination

parent 14d86869
No related branches found
No related tags found
1 merge request!162Refactoring 2021 05 20 start
...@@ -283,3 +283,17 @@ class RkiData(BlueprintFactTable): ...@@ -283,3 +283,17 @@ class RkiData(BlueprintFactTable):
db.session.query(cls).delete() db.session.query(cls).delete()
db.session.commit() db.session.commit()
return None return None
@classmethod
def get_by_location(cls, location: RkiLandkreis, page: int):
return db.session.query(cls).filter(cls.location == location).paginate(page, per_page=ITEMS_PER_PAGE)
@classmethod
def find_by_location(cls, location: RkiLandkreis):
return db.session.query(cls).filter(cls.location == location).all()
@classmethod
def get_by_date_reported_and_location(cls, date_reported: RkiMeldedatum, location: RkiLandkreis):
return db.session.query(cls)\
.filter(and_((cls.date_reported == date_reported), (cls.location == location)))\
.all()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment