mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-18 09:47:14 +00:00
Added validation for timezones
This commit is contained in:
@@ -3,8 +3,12 @@
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
# import frappe
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
|
||||
|
||||
class Timezone(Document):
|
||||
pass
|
||||
def validate(self):
|
||||
if self.offset > 720 or self.offset < -720:
|
||||
frappe.throw(
|
||||
'Timezone offsets must be between -720 and +720 minutes')
|
||||
|
||||
Reference in New Issue
Block a user