Skip to content

Commit

Permalink
Id haku toimii
Browse files Browse the repository at this point in the history
  • Loading branch information
StarlineOutwood committed Dec 6, 2023
1 parent d76a74f commit c9460e8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/services/filter_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,9 @@ def filter_by_id(self, id) -> list[Cite]:
Returns:
list[Cite]: lista viiteolioita, jotka sopivat hakusanaan
"""

cites = self.repository.get_all_cites()
if int(id) < 1:
return cites
filtered_cites = [cite for cite in cites if id in list(cite.id)]
filtered_cites = [cite for cite in cites if id in cite.id]
return filtered_cites

# def filter_by_tag(tag: str) -> list[Cite]:
# pass
# pass list(cite.id)

0 comments on commit c9460e8

Please sign in to comment.