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

work

parent 4c881275
No related branches found
No related tags found
2 merge requests!161Issue 66 attempt 01,!160Issue 66 attempt 01
......@@ -166,4 +166,5 @@ class EuropeData(db.Model):
@classmethod
def find_by_country(cls, europe_country, page):
return db.session.query(cls).filter(
cls.europe_country_id == europe_country.id).paginate(page, per_page=ITEMS_PER_PAGE)
cls.europe_country_id == europe_country.id)\
.paginate(page, per_page=ITEMS_PER_PAGE)
......@@ -50,7 +50,7 @@ class RkiCountry(db.Model):
@classmethod
def remove_all(cls):
for one in cls.get_all():
db.session.delete(one).cascade()
db.session.delete(one)
db.session.commit()
return None
......@@ -119,7 +119,8 @@ class RkiGermanyData(db.Model):
@classmethod
def remove_all(cls):
db.session.execute("delete from " + cls.__tablename__)
for one in cls.get_all():
db.session.delete(one)
db.session.commit()
return None
......
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