Skip to content

Commit

Permalink
Merge pull request #36 from gisce/check-cursor-readonly
Browse files Browse the repository at this point in the history
Check if cursor is readonly instead of instance mode
  • Loading branch information
ecarreras authored Oct 24, 2022
2 parents 1d563bc + 34a9332 commit 6313c6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orm_mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def _auto_init(self, cr, context=None):

def __init__(self, cr):
super(orm_mongodb, self).__init__(cr)
if not tools.config.get('db_readonly', False):
if not cr._cnx.readonly:
cr.execute('delete from wkf_instance where res_type=%s', (self._name,))

def get_date_fields(self):
Expand Down

0 comments on commit 6313c6e

Please sign in to comment.