Skip to content

Commit

Permalink
filter out nulls from cog_co_ids in preps_available_rs
Browse files Browse the repository at this point in the history
  • Loading branch information
acwhite211 committed Dec 17, 2024
1 parent e32044c commit 1a347d3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions specifyweb/interactions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,9 @@ def preps_available_rs(request, recordset_id):
# Get consolidated CO ids if the recordset is a COG
rs = Recordset.objects.filter(id=recordset_id).first()
cog_co_ids = get_co_ids_from_shared_cog_rs(rs)
cog_co_ids = [co_id for co_id in cog_co_ids if co_id is not None]
# cog_co_ids = set()
cog_co_ids_str = ','.join(map(str, cog_co_ids)) if cog_co_ids else 'NULL'
if cog_co_ids_str is None or cog_co_ids_str == '':
cog_co_ids_str = 'NULL'

cursor = connection.cursor()

Expand Down

0 comments on commit 1a347d3

Please sign in to comment.