|
@@ -81,7 +81,7 @@ def open_servicerequest_booked_process(localtask):
|
|
|
# Проверка срочности заказа
|
|
|
if True:
|
|
|
#Заглушка назначение исполнителя системой
|
|
|
- if set_provider(order.client_id, order.provider) == "success":
|
|
|
+ if set_provider(order.ticket, order.provider) == "success":
|
|
|
bot.proceed_status(proceed_to[0], localtask)
|
|
|
else:
|
|
|
bot.bot_log(botname+" "+str(datetime.now())+" "+"Ошибка назначения исполнителя\n")
|
|
@@ -110,9 +110,9 @@ def get_balance(client):
|
|
|
except Exception as ex:
|
|
|
print(ex)
|
|
|
|
|
|
-def set_provider(client, provider):
|
|
|
+def set_provider(ticket, provider):
|
|
|
headers = {'Authorization': f'Token {token}'}
|
|
|
- data = {'client': client,
|
|
|
+ data = {'ticket': ticket,
|
|
|
'provider': provider}
|
|
|
response = requests.post(config.API_URL+f"/api/example/set-provider", headers=headers, data=data)
|
|
|
print(response.json())
|
|
@@ -127,6 +127,7 @@ def set_provider(client, provider):
|
|
|
return message
|
|
|
except Exception as ex:
|
|
|
print(ex)
|
|
|
+
|
|
|
def open_servicerequest_booked():
|
|
|
while (len(tasklist)):
|
|
|
localtask=tasklist.pop(0)
|