From 5a0620f04b6400ad92563c94ebf649bcb86c5add Mon Sep 17 00:00:00 2001 From: Lu Bu <37246122+lubusax@users.noreply.github.com> Date: Tue, 30 May 2023 10:25:22 +0200 Subject: [PATCH] [FIX] hr_attendance_rfid: Handle ValidationError so rfid devices can handle it --- hr_attendance_rfid/models/hr_employee.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hr_attendance_rfid/models/hr_employee.py b/hr_attendance_rfid/models/hr_employee.py index d2cf82a0..e10eaf3c 100644 --- a/hr_attendance_rfid/models/hr_employee.py +++ b/hr_attendance_rfid/models/hr_employee.py @@ -69,6 +69,6 @@ def register_attendance(self, card_code): res["error_message"] = msg return res except Exception as e: - res["error_message"] = e - _logger.error(e) + res["error_message"] = repr(e) + _logger.error(repr(e)) return res