Fix bug: forgot cast to string

This commit is contained in:
PCoder 2019-09-14 22:16:37 +05:30
parent c2514cd5b5
commit 591eaadea2
1 changed files with 2 additions and 2 deletions

View File

@ -46,11 +46,11 @@ def get_plan_id_from_product(product):
def get_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
else:
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)
class ListProducts(Resource):