Skip to content

Commit

Permalink
pandas/devconfig: apply query_str when section is not specified
Browse files Browse the repository at this point in the history
Signed-off-by: LucaNicosia <[email protected]>
  • Loading branch information
LucaNicosia committed May 27, 2024
1 parent be27341 commit 4aa1c81
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion suzieq/engines/pandas/devconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ def get(self, **kwargs):
query_str = kwargs.pop('query_str', '')

df = super().get(columns=columns, **kwargs)
if df.empty or 'error' in df.columns or not section:
if df.empty or 'error' in df.columns:
return df

if not section:
if query_str:
df = df.query(query_str).reset_index(drop=True)
return df

devdf = self._get_table_sqobj('device') \
Expand Down

0 comments on commit 4aa1c81

Please sign in to comment.