File tree 3 files changed +8
-2
lines changed
3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -91,13 +91,19 @@ def get_data_payments(data):
91
91
92
92
93
93
def get_data_plans (data , method ):
94
+ if "_embedded" not in data :
95
+ return {"plans" : []}
96
+
94
97
if len (data ["_embedded" ]["plans" ]) == 1 and method == "POST" :
95
98
return {"plan" : Plan (data ["_embedded" ]["plans" ][0 ])}
96
99
97
100
return {"plans" : [Plan (plan_dict ) for plan_dict in data ["_embedded" ]["plans" ]]}
98
101
99
102
100
103
def get_data_subscriptions (data , method ):
104
+ if "_embedded" not in data :
105
+ return {"subscriptions" : []}
106
+
101
107
if len (data ["_embedded" ]["subscriptions" ]) == 1 and method == "POST" :
102
108
return {"subscription" : Subscription (data ["_embedded" ]["subscriptions" ][0 ])}
103
109
Original file line number Diff line number Diff line change 1
- VERSION = "0.4.0 "
1
+ VERSION = "0.4.1 "
2
2
API_VERSION = "2"
Original file line number Diff line number Diff line change 10
10
11
11
setup (
12
12
name = "juno-python" ,
13
- version = "0.4.0 " ,
13
+ version = "0.4.1 " ,
14
14
url = "https://github.com/mjr/juno-python" ,
15
15
author = __author__ ,
16
16
author_email = __author_email__ ,
You can’t perform that action at this time.
0 commit comments