Update call_center.py

Add missing argument to constructors
pull/548/head
Abdelrahman Naser 2021-07-12 07:27:35 +02:00 committed by GitHub
parent 50a04c0a14
commit cd116cc4ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -42,8 +42,8 @@ class Employee(metaclass=ABCMeta):
class Operator(Employee): class Operator(Employee):
def __init__(self, employee_id, name): def __init__(self, employee_id, name, call_center):
super(Operator, self).__init__(employee_id, name, Rank.OPERATOR) super(Operator, self).__init__(employee_id, name, Rank.OPERATOR, call_center)
def escalate_call(self): def escalate_call(self):
self.call.rank = Rank.SUPERVISOR self.call.rank = Rank.SUPERVISOR
@ -52,8 +52,8 @@ class Operator(Employee):
class Supervisor(Employee): class Supervisor(Employee):
def __init__(self, employee_id, name): def __init__(self, employee_id, name, call_center):
super(Operator, self).__init__(employee_id, name, Rank.SUPERVISOR) super(Operator, self).__init__(employee_id, name, Rank.SUPERVISOR, call_center)
def escalate_call(self): def escalate_call(self):
self.call.rank = Rank.DIRECTOR self.call.rank = Rank.DIRECTOR
@ -62,8 +62,8 @@ class Supervisor(Employee):
class Director(Employee): class Director(Employee):
def __init__(self, employee_id, name): def __init__(self, employee_id, name, call_center):
super(Operator, self).__init__(employee_id, name, Rank.DIRECTOR) super(Operator, self).__init__(employee_id, name, Rank.DIRECTOR, call_center)
def escalate_call(self): def escalate_call(self):
raise NotImplementedError('Directors must be able to handle any call') raise NotImplementedError('Directors must be able to handle any call')