fix: use max function to get default company address
This commit is contained in:
parent
6b3028d77b
commit
b93c18bd4a
@ -808,7 +808,7 @@ def get_default_company_address(name, sort_key="is_primary_address", existing_ad
|
|||||||
return existing_address
|
return existing_address
|
||||||
|
|
||||||
if out:
|
if out:
|
||||||
return min(out, key=lambda x: x[1])[0] # find min by sort_key
|
return max(out, key=lambda x: x[1])[0] # find max by sort_key
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user