Skip to content

Commit

Permalink
Merge pull request #17 from ShorensteinCenter/devel
Browse files Browse the repository at this point in the history
[Bugfix, N/A] Added lazy property to lists-to-users database relationship
  • Loading branch information
williamhakim10 authored Nov 1, 2018
2 parents 7c9946d + 33651c0 commit ed8ee38
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ListStats(db.Model): # pylint: disable=too-few-public-methods
store_aggregates = db.Column(db.Boolean)
monthly_updates = db.Column(db.Boolean)
monthly_update_users = db.relationship(
AppUser, secondary=list_users, backref='lists')
AppUser, secondary=list_users, backref='lists', lazy='subquery')

def __repr__(self):
return '<ListStats {}>'.format(self.list_id)
Expand Down
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Config():
},
'send_monthly_reports': {
'task': 'app.tasks.send_monthly_reports',
'schedule': crontab(minute='0', hour='0', day_of_month='1'),
'schedule': crontab(minute='0', hour='0', day_of_month='2'),
'args': ()
}
}
Expand Down
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ async-timeout==3.0.0
asyncio==3.4.3
attrs==18.2.0
billiard==3.5.0.4
blinker==1.4
boto3==1.9.21
botocore==1.12.21
cairocffi==0.9.0
Expand All @@ -24,7 +23,6 @@ decorator==4.3.0
defusedxml==0.5.0
docutils==0.14
Flask==1.0.2
Flask-Mail==0.9.1
Flask-Migrate==2.2.1
Flask-SQLAlchemy==2.3.2
flask-talisman==0.5.1
Expand Down

0 comments on commit ed8ee38

Please sign in to comment.