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')
|
||||
def on_change_prospect(self):
|
||||
if self.prospect:
|
||||
self.prospect_city = self.prospect.city
|
||||
if not self.prospect:
|
||||
return
|
||||
|
||||
mobile_contact = self._get_prospect_mobile_contact()
|
||||
if mobile_contact:
|
||||
self.prospect_contact = mobile_contact
|
||||
self.prospect_city = self.prospect.city
|
||||
mobile_contact = self._get_prospect_mobile_contact()
|
||||
if mobile_contact:
|
||||
self.prospect_contact = mobile_contact
|
||||
|
||||
def get_rec_name(self, name):
|
||||
if self.prospect:
|
||||
|
Loading…
Reference in New Issue
Block a user