Skip to content

Commit

Permalink
Update saved_searches.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kocio-pl authored and diegogangl committed Mar 10, 2024
1 parent 50d7034 commit 083353f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions GTG/core/saved_searches.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,10 @@ def new(self, name: str, query: str, parent: UUID = None) -> SavedSearch:
search_id = uuid4()
search = SavedSearch(id=search_id, name=name, query=query)

self.data.append(search)
self.lookup[search_id] = search
self.model.append(search)
if not self.find(name):
self.data.append(search)
self.lookup[search_id] = search
self.model.append(search)

return search

Expand Down

0 comments on commit 083353f

Please sign in to comment.