Ejemplo n.º 1
0
	def delete_room(self, room):
		meetings = session.query(Meeting).filter(Meeting.room == room.id).all()
		for m in meetings:
			for em in m.employees:
				session.delete(em)
			session.delete(m)
		session.delete(room)
		session.commit()
Ejemplo n.º 2
0
	def decline_meeting(self, employee_meeting):
		employee_meeting.pending = False
		employee_meeting.accepted = False
		session.delete(employee_meeting)
		session.commit()			
Ejemplo n.º 3
0
	def delete_employee(self, employee_id):
		employee = session.query(Employee).filter(Employee.id == employee_id).one()
		session.delete(employee)
		session.commit()
Ejemplo n.º 4
0
	def delete_employee_obj(self, employee):
		for em in employee.meetings:
			session.delete(em)
		session.delete(employee)
		session.commit()
Ejemplo n.º 5
0
	def delete_meeting(self, meeting):
		for em in meeting.employees:
			session.delete(em)
		session.delete(meeting)
		session.commit()