changes
This commit is contained in:
@@ -244,14 +244,15 @@ class FusionClockAPI(http.Controller):
|
||||
|
||||
location, distance, err, method = self._verify_location(latitude, longitude, employee, client_ip)
|
||||
if not location:
|
||||
# Log geofence violation
|
||||
err_msg = self._location_error_message(err, distance)
|
||||
err_msg += f" (Your IP: {client_ip})"
|
||||
self._log_activity(
|
||||
employee, 'outside_geofence',
|
||||
self._location_error_message(err, distance),
|
||||
err_msg,
|
||||
latitude=latitude, longitude=longitude, distance=distance, source=source,
|
||||
)
|
||||
return {
|
||||
'error': self._location_error_message(err, distance),
|
||||
'error': err_msg,
|
||||
'allowed': False,
|
||||
'error_type': err,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user