Skip to content

Commit

Permalink
add param to check whether to use heroku db
Browse files Browse the repository at this point in the history
  • Loading branch information
dhalpern committed Jan 23, 2020
1 parent 0632508 commit ea8047d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions psiturk/psiturk_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ def load_config(self):
# port to a fixed number database url is also dynamic
if 'ON_HEROKU' in os.environ:
self.set('Server Parameters', 'port', os.environ['PORT'])
self.set('Database Parameters', 'database_url',
os.environ['DATABASE_URL'])
if self.get('Database Parameters', 'use_heroku_db') == 'true':
self.set('Database Parameters', 'database_url', os.environ['DATABASE_URL'])

0 comments on commit ea8047d

Please sign in to comment.