Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

Commit ed8ee38

Browse files
Merge pull request #17 from ShorensteinCenter/devel
[Bugfix, N/A] Added lazy property to lists-to-users database relationship
2 parents 7c9946d + 33651c0 commit ed8ee38

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

app/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class ListStats(db.Model): # pylint: disable=too-few-public-methods
5151
store_aggregates = db.Column(db.Boolean)
5252
monthly_updates = db.Column(db.Boolean)
5353
monthly_update_users = db.relationship(
54-
AppUser, secondary=list_users, backref='lists')
54+
AppUser, secondary=list_users, backref='lists', lazy='subquery')
5555

5656
def __repr__(self):
5757
return '<ListStats {}>'.format(self.list_id)

config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Config():
1414
},
1515
'send_monthly_reports': {
1616
'task': 'app.tasks.send_monthly_reports',
17-
'schedule': crontab(minute='0', hour='0', day_of_month='1'),
17+
'schedule': crontab(minute='0', hour='0', day_of_month='2'),
1818
'args': ()
1919
}
2020
}

requirements.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ async-timeout==3.0.0
77
asyncio==3.4.3
88
attrs==18.2.0
99
billiard==3.5.0.4
10-
blinker==1.4
1110
boto3==1.9.21
1211
botocore==1.12.21
1312
cairocffi==0.9.0
@@ -24,7 +23,6 @@ decorator==4.3.0
2423
defusedxml==0.5.0
2524
docutils==0.14
2625
Flask==1.0.2
27-
Flask-Mail==0.9.1
2826
Flask-Migrate==2.2.1
2927
Flask-SQLAlchemy==2.3.2
3028
flask-talisman==0.5.1

0 commit comments

Comments
 (0)