Fix session reference bug in schedule view

This commit is contained in:
Lance Edgar 2017-02-21 12:01:40 -06:00
parent 7d18766aa1
commit cb96272b46

View file

@ -84,9 +84,9 @@ class ScheduleView(TimeSheetView):
deleted = [] deleted = []
for uuid, value in data['delete'].iteritems(): for uuid, value in data['delete'].iteritems():
if value == 'delete': if value == 'delete':
shift = self.Session.query(model.ScheduledShift).get(uuid) shift = Session.query(model.ScheduledShift).get(uuid)
if shift: if shift:
self.Session.delete(shift) Session.delete(shift)
deleted.append(uuid) deleted.append(uuid)
# apply create / update operations # apply create / update operations