[FIX] LEAVE: Fixed leave restriction in fresh db (#312)
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
from leave.models import EmployeePastLeaveRestrict
|
||||
|
||||
try:
|
||||
enabled_restriction = EmployeePastLeaveRestrict.objects.first()
|
||||
if not enabled_restriction:
|
||||
enabled_restriction = EmployeePastLeaveRestrict.objects.create(enabled=True)
|
||||
except:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user