Fix bug: forgot cast to string
This commit is contained in:
parent
c2514cd5b5
commit
591eaadea2
|
@ -46,11 +46,11 @@ def get_plan_id_from_product(product):
|
||||||
|
|
||||||
def get_order_id():
|
def get_order_id():
|
||||||
order_id_kv = client.get("/v1/last_order_id")
|
order_id_kv = client.get("/v1/last_order_id")
|
||||||
if order_id_kv:
|
if order_id_kv is not None:
|
||||||
order_id = int(order_id_kv.value) + 1
|
order_id = int(order_id_kv.value) + 1
|
||||||
else:
|
else:
|
||||||
order_id = config("INIT_ORDER_ID")
|
order_id = config("INIT_ORDER_ID")
|
||||||
client.put("/v1/last_order_id", order_id)
|
client.put("/v1/last_order_id", str(order_id))
|
||||||
return "OR-{}".format(order_id)
|
return "OR-{}".format(order_id)
|
||||||
|
|
||||||
class ListProducts(Resource):
|
class ListProducts(Resource):
|
||||||
|
|
Loading…
Reference in New Issue