Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Attendance Error #2479

Open
niyazrazak opened this issue Dec 4, 2024 · 0 comments
Open

Auto Attendance Error #2479

niyazrazak opened this issue Dec 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@niyazrazak
Copy link
Contributor

Information about bug

Error occur when mark attendance btn click inside shift type

Module

HR

Version

"erpnext": "15.44.0",
"frappe": "15.48.1",
"helpdesk": "1.0.0",
"hrms": "15.35.3",

Installation method

None

Relevant log output / Stack trace / Full Error Message.

### App Versions

{
	"erpnext": "15.44.0",
	"frappe": "15.48.1",
	"helpdesk": "1.0.0",
	"hrms": "15.35.3",
}

Route

Form/Shift Type/Day Shift

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 114, in application
    response = frappe.api.handle(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
           ^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/handler.py", line 49, in handle
    data = execute_cmd(cmd)
           ^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/__init__.py", line 1725, in call
    return fn(*args, **newargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/handler.py", line 331, in run_doc_method
    response = doc.run_method(method)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/document.py", line 966, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/document.py", line 1326, in composer
    return composed(self, method, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/document.py", line 1308, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/document.py", line 963, in fn
    return method_object(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "apps/hrms/hrms/hr/doctype/shift_type/shift_type.py", line 40, in process_auto_attendance
    for key, group in groupby(sorted(logs, key=group_key), key=group_key):
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'datetime.datetime' and 'NoneType'

Request Data

{
	"type": "POST",
	"args": {
		"docs": "{\"name\":\"Day Shift\",\"owner\":\"[email protected]\",\"creation\":\"2024-02-27 15:55:39.551300\",\"modified\":\"2024-12-04 17:04:47.866940\",\"modified_by\":\"[email protected]\",\"docstatus\":0,\"idx\":116,\"start_time\":\"7:30:00\",\"end_time\":\"17:00:00\",\"holiday_list\":\"2024\",\"color\":\"Blue\",\"enable_auto_attendance\":1,\"determine_check_in_and_check_out\":\"Alternating entries as IN and OUT during the same shift\",\"working_hours_calculation_based_on\":\"First Check-in and Last Check-out\",\"begin_check_in_before_shift_start_time\":60,\"allow_check_out_after_shift_end_time\":300,\"mark_auto_attendance_on_holidays\":0,\"working_hours_threshold_for_half_day\":6,\"working_hours_threshold_for_absent\":1,\"process_attendance_after\":\"2024-11-27\",\"last_sync_of_checkin\":\"2024-12-04 17:04:45.882627\",\"enable_late_entry_marking\":1,\"late_entry_grace_period\":15,\"enable_early_exit_marking\":0,\"early_exit_grace_period\":10,\"doctype\":\"Shift Type\",\"__last_sync_on\":\"2024-12-04T14:05:10.414Z\"}",
		"method": "process_auto_attendance"
	},
	"freeze": true,
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/run_doc_method",
	"request_id": "cb0483a9-3d5a-4179-bac3-9c669c2017aa"
}

Response Data

{
	"exception": "TypeError: '<' not supported between instances of 'datetime.datetime' and 'NoneType'",
	"exc_type": "TypeError",
	"_exc_source": "hrms (app)"
}


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
@niyazrazak niyazrazak added the bug Something isn't working label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant