Skip to content

Commit e4e91f0

Browse files
authored
Merge pull request #73 from JaviCerveraIngram/CPS-57-accept-usage-file
CPS-57 Accept Usage File is sending wrong parameter in post request.
2 parents 09afc82 + f4b7a1b commit e4e91f0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

connect/resources/usage_file_automation.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# This file is part of the Ingram Micro Cloud Blue Connect SDK.
44
# Copyright (c) 2019 Ingram Micro. All Rights Reserved.
55

6+
import json
67
import logging
78
from abc import ABCMeta
89

@@ -62,9 +63,9 @@ def dispatch(self, request):
6263
except UsageFileAction as usage:
6364
self._api.post(
6465
path='{}/{}'.format(request.id, usage.code),
65-
json=usage.obj.json
66-
if isinstance(usage.obj, BaseModel)
67-
else getattr(usage.obj, '__dict__', str(usage.obj)))
66+
data=json.dumps(usage.obj.json
67+
if isinstance(usage.obj, BaseModel)
68+
else usage.obj))
6869
processing_result = usage.code
6970

7071
# Catch skip

0 commit comments

Comments
 (0)