chore: Se refactoriza on_change_calls para mejor legibilidad
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
6fb2e1d537
commit
a7972a898a
@ -42,12 +42,16 @@ class ProspectTrace(DeactivableMixin, ModelSQL, ModelView):
|
|||||||
last_call = self.calls[-1]
|
last_call = self.calls[-1]
|
||||||
self.current_interest = last_call.interest
|
self.current_interest = last_call.interest
|
||||||
|
|
||||||
if len(self.calls) > 1:
|
already_exist_a_call = len(self.calls) > 1
|
||||||
last_call.call_type = CallTypes.get_call_types()[1][0]
|
if already_exist_a_call:
|
||||||
|
followup_call_type = CallTypes.get_call_types()[1][0]
|
||||||
|
last_call.call_type = followup_call_type
|
||||||
else:
|
else:
|
||||||
last_call.call_type = CallTypes.get_call_types()[0][0]
|
first_call_type = CallTypes.get_call_types()[0][0]
|
||||||
|
last_call.call_type = first_call_type
|
||||||
|
|
||||||
if len(self.pending_calls) >= 1:
|
there_is_a_pending_call = len(self.pending_calls) >= 1
|
||||||
|
if there_is_a_pending_call:
|
||||||
self.pending_calls = None
|
self.pending_calls = None
|
||||||
self.state = 'open'
|
self.state = 'open'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user