mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-21 03:27:25 -06:00
[FIX] pep8
This commit is contained in:
parent
7fad9182db
commit
f387ff26e2
@ -39,7 +39,6 @@ class DocumentDirectory(Model):
|
||||
],
|
||||
context=context),
|
||||
context=context):
|
||||
#TODO: add write tests
|
||||
result.append(this)
|
||||
return result
|
||||
|
||||
@ -60,6 +59,7 @@ class DocumentDirectory(Model):
|
||||
from openerp.addons.web.http import httprequest
|
||||
from openerp.addons.web.controllers.main import Binary
|
||||
original = Binary.upload_attachment
|
||||
|
||||
@httprequest
|
||||
def upload_attachment(self, req, callback, model, id, ufile,
|
||||
directory_id=None):
|
||||
|
@ -19,7 +19,6 @@
|
||||
#
|
||||
##############################################################################
|
||||
from openerp.osv.orm import Model
|
||||
from openerp.osv import fields
|
||||
|
||||
|
||||
class IrAttachment(Model):
|
||||
@ -28,7 +27,8 @@ class IrAttachment(Model):
|
||||
def _auto_init(self, cr, context=None):
|
||||
'''drop filename_unique if it exists and prevent it from being
|
||||
created'''
|
||||
cr.execute('''SELECT
|
||||
cr.execute(
|
||||
'''SELECT
|
||||
conname, pg_catalog.pg_get_constraintdef(oid, true) as condef
|
||||
FROM pg_constraint where conname=%s''',
|
||||
('ir_attachment_filename_unique',))
|
||||
@ -51,5 +51,3 @@ class IrAttachment(Model):
|
||||
cr, uid, ids, fields_to_read=fields_to_read, context=context,
|
||||
load=load)
|
||||
return result
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user