Skip to content

Commit

Permalink
Remove unnecessary check (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
cheukt authored Sep 21, 2023
1 parent c12ae72 commit 118c178
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/viam/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ async def to_thread(func: Callable[_P, _R], *args: _P.args, **kwargs: _P.kwargs)

def from_dm_from_extra(extra: Optional[Dict[str, Any]]) -> bool:
"""Used in modular filter components to get the 'fromDataManagement' value from an extra map."""
if extra is None or "fromDataManagement" not in extra:
if extra is None:
return False

return bool(extra.get("fromDataManagement", False))

0 comments on commit 118c178

Please sign in to comment.