Skip to content

Commit

Permalink
Removed numeric check on list numbers (both main lists and custom lis…
Browse files Browse the repository at this point in the history
…ts).
  • Loading branch information
genghisken committed Jan 31, 2025
1 parent b1e335f commit d66a74e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion psat_server_web/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.5.5'
__version__ = '0.5.6'
18 changes: 8 additions & 10 deletions psat_server_web/atlas/atlas/apiutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,16 @@ def getObjectList(request, listId, getCustomList = False, dateThreshold = None):
querySet = None

if getCustomList:
if listId > 0 and listId <= 100:
if dateThreshold is not None:
querySet = WebViewUserDefined.objects.filter(object_group_id = listId, followup_flag_date__gt = dateThreshold)
else:
querySet = WebViewUserDefined.objects.filter(object_group_id = listId)
if dateThreshold is not None:
querySet = WebViewUserDefined.objects.filter(object_group_id = listId, followup_flag_date__gt = dateThreshold)
else:
querySet = WebViewUserDefined.objects.filter(object_group_id = listId)
else:
# There are currently 11 valid lists.
if listId >= 0 and listId <= 11:
if dateThreshold is not None:
querySet = followupClassList[int(listId)].objects.filter(followup_flag_date__gt = dateThreshold)
else:
querySet = followupClassList[int(listId)].objects.all()
if dateThreshold is not None:
querySet = followupClassList[int(listId)].objects.filter(followup_flag_date__gt = dateThreshold)
else:
querySet = followupClassList[int(listId)].objects.all()

objectList = []

Expand Down

0 comments on commit d66a74e

Please sign in to comment.