diff options
| author | Munyoki Kilyungi | 2025-04-25 17:04:40 +0300 |
|---|---|---|
| committer | BonfaceKilz | 2025-04-25 18:57:37 +0300 |
| commit | b6754b2ea3c94131639c762de5fe1facf41ef663 (patch) | |
| tree | 6c901169ab72b7ec5723fca47bf48afdb5c0f060 /gn3/db/wiki.py | |
| parent | 3bdb2c33b131f840d6b33d199a42b3b4d4761802 (diff) | |
| download | genenetwork3-b6754b2ea3c94131639c762de5fe1facf41ef663.tar.gz | |
Return a zero when the species is unspecified.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn3/db/wiki.py')
| -rw-r--r-- | gn3/db/wiki.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gn3/db/wiki.py b/gn3/db/wiki.py index 7565f05..f422589 100644 --- a/gn3/db/wiki.py +++ b/gn3/db/wiki.py @@ -48,6 +48,8 @@ def get_latest_comment(connection, comment_id: int) -> int: def get_species_id(cursor, species_name: str) -> int: """Find species id given species `Name`""" + if species_name.lower() == "no specific species": + return 0 cursor.execute( "SELECT SpeciesID from Species WHERE Name = %s", (species_name,)) species_ids = cursor.fetchall() |
