Skip to content

Commit

Permalink
Merge pull request #24 from jamilatta/inprovement_add_asset
Browse files Browse the repository at this point in the history
Garantindo o param metadata como string para o GRPC.
  • Loading branch information
brunousml authored Feb 3, 2017
2 parents 1fb3c81 + d949b33 commit a31423f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions opac_ssm_api/client.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# coding: utf-8
import os
import grpc
import six
import grpc
import json
import logging

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -74,7 +75,7 @@ def add_asset(self, pfile, filename='', filetype='', metadata=''):
file=file_content,
filename=filename,
type=filetype,
metadata=str(metadata)
metadata=json.dumps(metadata)
)

return self.stub.add_asset(asset).id
Expand Down

0 comments on commit a31423f

Please sign in to comment.