Skip to content

fix: check roomNumber key before indexing - #608

Open
costowell wants to merge 1 commit into
developfrom
cole-dev
Open

fix: check roomNumber key before indexing#608
costowell wants to merge 1 commit into
developfrom
cole-dev

Conversation

@costowell

Copy link
Copy Markdown
Contributor

What

  • title

Why

  • explodes otherwise
File "/opt/conditional/conditional/util/housing.py", line 47, in get_queue_position
queue = get_housing_queue()
File "/opt/conditional/conditional/util/housing.py", line 31, in get_housing_queue
queue = list(filter(lambda member: member['uid'] in in_queue and member['roomNumber'] is not None, queue))
File "/opt/conditional/conditional/util/housing.py", line 31, in <lambda>
queue = list(filter(lambda member: member['uid'] in in_queue and member['roomNumber'] is not None, queue))
~~~~~~^^^^^^^^^^^^^^
KeyError: 'roomNumber'

Test Plan

  • check it doesn't explode
    • probably needs to be checked by an off floor member

Env Vars

  • nah

Documentation

  • nah

Checklist

  • Tested all changes locally

@datadog-computersciencehouse

datadog-computersciencehouse Bot commented Aug 31, 2026

Copy link
Copy Markdown

Pipelines

⚠️ Warnings

⚠️ Your PR has warnings. Please review the issues below.

🚦 1 Pipeline job failed

Python application | lint (3.12)

View in Datadog · View in GitHub Actions

Pylint error in conditional/util/housing.py:27:0. Line too long (121/120)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 1490549 | Docs | View more details | Give us feedback!

aln730
aln730 previously approved these changes Aug 31, 2026
@csh-sonarqube-community

Copy link
Copy Markdown

Passed Quality Gate passed

Issues

Measures

Project ID: ComputerScienceHouse_conditional_b4074151-bbfd-4fc3-b87d-10f1c1f625ab

View in SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants