Skip to content

Commit 47f6e23

Browse files
committed
Removed possibility to save value in search function argument
1 parent 5b93b79 commit 47f6e23

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bugout/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ def search(
568568
token: Union[str, uuid.UUID],
569569
journal_id: Union[str, uuid.UUID],
570570
query: str,
571-
filters: List[str] = [],
571+
filters: Optional[List[str]] = None,
572572
limit: int = 10,
573573
offset: int = 0,
574574
content: bool = True,

bugout/journal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ def search(
381381
token: Union[str, uuid.UUID],
382382
journal_id: Union[str, uuid.UUID],
383383
query: str,
384-
filters: List[str] = [],
384+
filters: Optional[List[str]] = None,
385385
limit: int = 10,
386386
offset: int = 0,
387387
content: bool = True,
@@ -392,7 +392,7 @@ def search(
392392
}
393393
query_params = {
394394
"q": query,
395-
"filters": filters,
395+
"filters": filters if filters is not None else [],
396396
"limit": limit,
397397
"offset": offset,
398398
"content": content,

0 commit comments

Comments
 (0)