Skip to content

Commit

Permalink
Minor cleanup for readability.
Browse files Browse the repository at this point in the history
  • Loading branch information
synrg committed Aug 11, 2024
1 parent eb75bae commit dc77e95
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions dronefly/core/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,10 @@ def get_inat_user_default(self, inat_param: str):
"""Return iNat API default for user param default, if any, otherwise global default."""
if inat_param not in INAT_USER_DEFAULT_PARAMS:
return None
default = None
if self.author:
default = getattr(self.author, inat_param, None) or INAT_DEFAULTS.get(
inat_param
)
else:
default = getattr(self.author, inat_param, None)
if not default:
default = INAT_DEFAULTS.get(inat_param)
return default

Expand Down

0 comments on commit dc77e95

Please sign in to comment.