Merge branch 'develop' into feature/pylint

# Conflicts:
#	main/extra_func.py
This commit is contained in:
Andrew Smirnov 2021-04-29 20:38:20 +03:00
commit eb1ef72adb
No known key found for this signature in database
GPG Key ID: 0EFE318E5BB2A82A
4 changed files with 5 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
layouts/work/workv2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -14,6 +14,7 @@ from django.utils import timezone
from zenpy import Zenpy
from zenpy.lib.exception import APIException
from zenpy.lib.api_objects import User as ZenpyUser, Ticket as ZenpyTicket
from zenpy.lib.generator import SearchResultGenerator
from access_controller.settings import ZENDESK_ROLES as ROLES, ONE_DAY, ACTRL_ZENDESK_SUBDOMAIN
from main.models import UserProfile, RoleChangeLogs, UnassignedTicket, UnassignedTicketStatus
@ -55,7 +56,7 @@ def make_light_agent(user_profile: UserProfile) -> None:
:return: Вызов функции **update_role** с параметрами:
профиль пользователя, роль "light_agent"
"""
tickets = get_tickets_list(user_profile.user.email)
tickets: SearchResultGenerator = get_tickets_list(user_profile.user.email)
ticket: ZenpyTicket
for ticket in tickets:
UnassignedTicket.objects.create(
@ -69,7 +70,9 @@ def make_light_agent(user_profile: UserProfile) -> None:
else:
ticket.assignee = None
ticket.group_id = zenpy.buffer_group_id
zenpy.admin.tickets.update(tickets.values)
if tickets.count:
zenpy.admin.tickets.update(tickets.values)
attempts, success = 5, False
while not success and attempts != 0:

View File

@ -1,6 +1,4 @@
"use strict";
import React from "react";
import ReactDOM from "react-dom";
function head_checkbox() {
let head_checkbox = document.getElementById("head-checkbox");