Added validation for timezones
This commit is contained in:
parent
ad6151b690
commit
eb4fa966b0
@ -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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user