Skip to content

Commit

Permalink
Remove list comprehension filter because of LIMIT 1 in SQL query
Browse files Browse the repository at this point in the history
  • Loading branch information
Bouni committed Aug 2, 2024
1 parent d6a18ad commit bf16841
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def get_part_details(self, lcsc: list) -> list:
for number in lcsc:
self.logger.debug(number)
cur.execute(query, {"number": f'"{number}"'})
results.extend([x for x in cur.fetchall() if x["lcsc"] == number]) # Filter exact match as FTS5 does return every match
results.extend(cur.fetchall())
return results

def update(self):
Expand Down

0 comments on commit bf16841

Please sign in to comment.