Skip to content

Commit 6313c6e

Browse files
authored
Merge pull request #36 from gisce/check-cursor-readonly
Check if cursor is readonly instead of instance mode
2 parents 1d563bc + 34a9332 commit 6313c6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

orm_mongodb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def _auto_init(self, cr, context=None):
114114

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

120120
def get_date_fields(self):

0 commit comments

Comments
 (0)