Changeset 4afe8e9 in tailbone


Ignore:
Timestamp:
10/15/19 20:33:37 (4 weeks ago)
Author:
Lance Edgar <lance@…>
Branches:
master
Children:
85e67a97
Parents:
c525b16
Message:

Don't bug out if stores, departments fields aren't present for Employee

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tailbone/views/employees.py

    rc525b16 r4afe8e9  
    212212
    213213    def update_stores(self, employee, data):
     214        if 'stores' not in data:
     215            return
    214216        old_stores = set([s.uuid for s in employee.stores])
    215217        new_stores = data['stores']
     
    223225
    224226    def update_departments(self, employee, data):
     227        if 'departments' not in data:
     228            return
    225229        old_depts = set([d.uuid for d in employee.departments])
    226230        new_depts = data['departments']
Note: See TracChangeset for help on using the changeset viewer.