mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 15:39:20 +00:00
Added validation for timezones
This commit is contained in:
@@ -3,8 +3,12 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
# import frappe
|
import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
|
||||||
class Timezone(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