Fix bugs when checking for 'chuck' in demo mode

This commit is contained in:
Lance Edgar 2017-03-24 17:57:23 -05:00
parent e37e17adf0
commit 4a2f329613

View file

@ -113,12 +113,12 @@ class EmployeesView(MasterView):
def editable_instance(self, employee):
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
def deletable_instance(self, employee):
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
def _preconfigure_fieldset(self, fs):