astregs: decode document's base64 content (#34788)

This commit is contained in:
Serghei Mihai 2019-07-12 13:50:03 +02:00
parent d76e7ae413
commit d0ba673d72
1 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import base64
import zeep
from zeep.helpers import serialize_object
@ -500,7 +501,7 @@ class AstreGS(BaseResource):
document = post_data.pop('document')
post_data['NomFichier'] = document['filename']
post_data['MimeType'] = document['content_type']
post_data['Contenu'] = document['content']
post_data['Contenu'] = base64.b64decode(document['content'])
r = self.call('DocumentAnnexe', 'Creation',
DocumentAnnexe=post_data
)