Added uniqueness check for offset
This commit is contained in:
parent
e543fc483f
commit
249cdd92e0
@ -12,3 +12,6 @@ class Timezone(Document):
|
||||
if self.offset > 720 or self.offset < -720:
|
||||
frappe.throw(
|
||||
'Timezone offsets must be between -720 and +720 minutes')
|
||||
if frappe.db.exists({'doctype':'Timezone','offset':self.offset}):
|
||||
frappe.throw(
|
||||
'Timezone offsets need to be unique')
|
Loading…
x
Reference in New Issue
Block a user