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 = []
for uuid, value in data['delete'].iteritems():
if value == 'delete':
shift = self.Session.query(model.ScheduledShift).get(uuid)
shift = Session.query(model.ScheduledShift).get(uuid)
if shift:
self.Session.delete(shift)
Session.delete(shift)
deleted.append(uuid)
# apply create / update operations