Skip to content

Commit

Permalink
Use autorollback=True by default in PeeweeDatabaseConnection
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Jun 9, 2020
1 parent 6f316ad commit e5d7dfe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Changelog
This document records the main changes to the ``sdssdb`` code.

* Add ``ForeignKeyField`` to ``TIC_v8`` where for all models in ``catalogdb`` connected to Gaia.
* Use ``autorollback=True`` by default in `.PeeweeDatabaseConnection`.

* :release:`0.4.2 <2020-06-05>`
* Add schema for ``gaia_dr2_ruwe``.
Expand Down
4 changes: 3 additions & 1 deletion python/sdssdb/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,9 @@ def __init__(self, *args, **kwargs):

self._metadata = {}

PostgresqlDatabase.__init__(self, None)
autorollback = kwargs.pop('autorollback', True)

PostgresqlDatabase.__init__(self, None, autorollback=autorollback)
DatabaseConnection.__init__(self, *args, **kwargs)

@property
Expand Down

0 comments on commit e5d7dfe

Please sign in to comment.