From 4a2f32961317d9afd80cc64b6bbaa99978e34684 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 24 Mar 2017 17:57:23 -0500 Subject: [PATCH] Fix bugs when checking for 'chuck' in demo mode --- tailbone/views/employees.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tailbone/views/employees.py b/tailbone/views/employees.py index b9e2c90c..faed01c5 100644 --- a/tailbone/views/employees.py +++ b/tailbone/views/employees.py @@ -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):