Skip to content

Commit

Permalink
License Change, biostar_setting.js script and readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuel-mwendwa committed May 7, 2024
1 parent f2b2bba commit bc65887
Show file tree
Hide file tree
Showing 6 changed files with 672 additions and 28 deletions.
661 changes: 661 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Navari Biostar Integration
## Frappe HR integration with Biostar Biometric

Biometrics Integration Application with FrappeHR
Frappe HR integration with Biostar Biometric

#### License

mit
GNU
21 changes: 0 additions & 21 deletions license.txt

This file was deleted.

8 changes: 5 additions & 3 deletions navari_biostar_integration/controllers/biostar_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,14 @@ def is_cookie_expired(cookie_string):
cookie.load(cookie_string)

"""extract 'expires' attribute"""
expires = cookie.get("bs-ta-session-id").get("expires")
bs_ta_session_id_cookie = cookie.get("bs-ta-session-id")

"""'expires' attribute absent, cookie does not expire"""
if not expires:
""" Check if 'bs-ta-session-id' cookie exists and has 'expires' attribute """
if bs_ta_session_id_cookie is None or "expires" not in bs_ta_session_id_cookie:
return False

expires = bs_ta_session_id_cookie["expires"]

expires_date = datetime.strptime(expires, "%a, %d %b %Y %H:%M:%S %Z")

return expires_date <= datetime.utcnow()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ frappe.ui.form.on("Biostar Settings", {
loader.style.display = "block";
frappe.call({
method:
"navari_vf.controllers.biostar_calls.add_checkin_logs_for_specified_dates",
"navari_biostar_integration.controllers.biostar_calls.add_checkin_logs_for_specified_dates",
args: {
start_date: frm.doc.start_date,
end_date: frm.doc.end_date,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"actions": [],
"allow_rename": 1,
"creation": "2024-05-07 09:57:55.164446",
"default_view": "List",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"biostar_server_login_section",
Expand Down

0 comments on commit bc65887

Please sign in to comment.