Skip to content

Commit

Permalink
fix: skip setting geolocation if tracking is disabled
Browse files Browse the repository at this point in the history
(cherry picked from commit 63e3b70)
  • Loading branch information
ruchamahabal authored and mergify[bot] committed May 29, 2024
1 parent e49589f commit c886999
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hrms/hr/doctype/employee_checkin/employee_checkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ def fetch_shift(self):

@frappe.whitelist()
def set_geolocation_from_coordinates(self):
if not frappe.db.get_single_value("HR Settings", "allow_geolocation_tracking"):
return

if not (self.latitude and self.longitude):
return

Expand Down

0 comments on commit c886999

Please sign in to comment.