Fix bugs when checking for 'chuck' in demo mode
This commit is contained in:
parent
e37e17adf0
commit
4a2f329613
|
@ -113,12 +113,12 @@ class EmployeesView(MasterView):
|
||||||
|
|
||||||
def editable_instance(self, employee):
|
def editable_instance(self, employee):
|
||||||
if self.rattail_config.demo():
|
if self.rattail_config.demo():
|
||||||
return not bool(employee.user and employee.username == 'chuck')
|
return not bool(employee.user and employee.user.username == 'chuck')
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def deletable_instance(self, employee):
|
def deletable_instance(self, employee):
|
||||||
if self.rattail_config.demo():
|
if self.rattail_config.demo():
|
||||||
return not bool(employee.user and employee.username == 'chuck')
|
return not bool(employee.user and employee.user.username == 'chuck')
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _preconfigure_fieldset(self, fs):
|
def _preconfigure_fieldset(self, fs):
|
||||||
|
|
Loading…
Reference in a new issue