Browse Source

publish muk_fields_lobject - 12.0

pull/9/head
MuK IT GmbH 6 years ago
parent
commit
3346fce36a
  1. 2
      muk_fields_lobject/__manifest__.py
  2. 3
      muk_fields_lobject/models/ir_http.py

2
muk_fields_lobject/__manifest__.py

@ -20,7 +20,7 @@
{
"name": "MuK Large Objects",
"summary": """PGSQL Large Objects Support""",
"version": '12.0.2.2.3',
"version": '12.0.2.2.4',
"category": 'Extra Tools',
"license": "AGPL-3",
"website": "https://www.mukit.at",

3
muk_fields_lobject/models/ir_http.py

@ -17,6 +17,7 @@
#
###################################################################################
import io
import logging
import mimetypes
@ -66,7 +67,7 @@ class LargeObjectControllerIrHttp(models.AbstractModel):
except AccessError:
return (403, [], None)
status, headers, content = None, [], None
content = obj.with_context({'stream': True})[field] or b''
content = obj.with_context({'stream': True})[field] or io.BytesIO()
if not filename:
if filename_field in obj:
filename = obj[filename_field]

Loading…
Cancel
Save