mirror of
https://github.com/erpnext/foundation.git
synced 2026-10-16 18:00:47 +02:00
fix: Compatibility fixes for Frappe v13, develop & Py3
This commit is contained in:
@@ -14,8 +14,8 @@ class ESoCApplicant(Document):
|
||||
self.validate_agreement_check()
|
||||
|
||||
def validate_email_type(self, email):
|
||||
from frappe.utils import validate_email_add
|
||||
validate_email_add(email.strip(), True)
|
||||
from frappe.utils import validate_email_address
|
||||
validate_email_address(email.strip(), True)
|
||||
|
||||
def validate_dob(self):
|
||||
from frappe.utils import now_datetime, getdate
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
from __future__ import unicode_literals
|
||||
# import frappe
|
||||
from frappe.model.document import Document
|
||||
from frappe.website.render import clear_cache as clear_website_cache
|
||||
from frappe.website.utils import clear_cache as clear_website_cache
|
||||
|
||||
class FoundationProject(Document):
|
||||
def validate(self):
|
||||
|
||||
@@ -25,6 +25,6 @@ def get_last_login_diff(user):
|
||||
Returns difference between todays date and last login date
|
||||
"""
|
||||
last_login = frappe.db.get_value("User", user, ["last_login"])
|
||||
for x in xrange(1,10):
|
||||
for x in range(1,10):
|
||||
print((get_datetime() - get_datetime(last_login)).days, user)
|
||||
return (get_datetime() - get_datetime(last_login)).days
|
||||
|
||||
Reference in New Issue
Block a user