diff --git a/tailbone/views/employees.py b/tailbone/views/employees.py index fcc63ad4..488e1f65 100644 --- a/tailbone/views/employees.py +++ b/tailbone/views/employees.py @@ -211,6 +211,8 @@ class EmployeesView(MasterView): return employee def update_stores(self, employee, data): + if 'stores' not in data: + return old_stores = set([s.uuid for s in employee.stores]) new_stores = data['stores'] for uuid in new_stores: @@ -222,6 +224,8 @@ class EmployeesView(MasterView): employee.stores.remove(store) def update_departments(self, employee, data): + if 'departments' not in data: + return old_depts = set([d.uuid for d in employee.departments]) new_depts = data['departments'] for uuid in new_depts: