chore: Se usa if guard para romper flujo en caso de nulo
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
55b7aada89
commit
b63f0ffd85
@ -41,12 +41,13 @@ class ProspectTrace(ModelSQL, ModelView):
|
|||||||
|
|
||||||
@fields.depends('prospect')
|
@fields.depends('prospect')
|
||||||
def on_change_prospect(self):
|
def on_change_prospect(self):
|
||||||
if self.prospect:
|
if not self.prospect:
|
||||||
self.prospect_city = self.prospect.city
|
return
|
||||||
|
|
||||||
mobile_contact = self._get_prospect_mobile_contact()
|
self.prospect_city = self.prospect.city
|
||||||
if mobile_contact:
|
mobile_contact = self._get_prospect_mobile_contact()
|
||||||
self.prospect_contact = mobile_contact
|
if mobile_contact:
|
||||||
|
self.prospect_contact = mobile_contact
|
||||||
|
|
||||||
def get_rec_name(self, name):
|
def get_rec_name(self, name):
|
||||||
if self.prospect:
|
if self.prospect:
|
||||||
|
Loading…
Reference in New Issue
Block a user