Projet

Général

Profil

0001-astregs-decode-document-s-base64-content-34788.patch

Serghei Mihai, 12 juillet 2019 13:51

Télécharger (1,18 ko)

Voir les différences:

Subject: [PATCH] astregs: decode document's base64 content (#34788)

 passerelle/apps/astregs/models.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
passerelle/apps/astregs/models.py
14 14
# You should have received a copy of the GNU Affero General Public License
15 15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 16

  
17
import base64
17 18
import zeep
18 19
from zeep.helpers import serialize_object
19 20

  
......
500 501
        document = post_data.pop('document')
501 502
        post_data['NomFichier'] = document['filename']
502 503
        post_data['MimeType'] = document['content_type']
503
        post_data['Contenu'] = document['content']
504
        post_data['Contenu'] = base64.b64decode(document['content'])
504 505
        r = self.call('DocumentAnnexe', 'Creation',
505 506
                      DocumentAnnexe=post_data
506 507
        )
507
-