Browse Source

[FIX] error in previous merge

pull/95/head
unknown 11 years ago
committed by Stefan Rijnhart
parent
commit
5486cc51dc
  1. 7
      database_cleanup/model/purge_models.py

7
database_cleanup/model/purge_models.py

@ -66,14 +66,13 @@ class CleanupPurgeLineModel(orm.TransientModel):
row = cr.fetchone()
if row:
self.logger.info('Purging model %s', row[1])
attachment_ids = attachment_pool.search(
cr, uid, [('res_model', '=', line.name)], context=context)
if attachment_ids:
cr.execute(
"UPDATE ir_attachment SET res_model = FALSE "
"WHERE id in %s",
(tuple(attachment_ids), ))
if attachment_ids:
attachment_pool.write(
cr, uid, attachment_ids, {'res_model': False},
context=context)
constraint_ids = constraint_pool.search(
cr, uid, [('model', '=', line.name)], context=context)
if constraint_ids:

Loading…
Cancel
Save