Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature/PI-650] Read as device #425

Open
wants to merge 6 commits into
base: feature/PI-572-create_an_as_device
Choose a base branch
from

Conversation

jameslinnell
Copy link
Contributor

No description provided.

@jameslinnell jameslinnell requested a review from a team as a code owner November 26, 2024 12:34
@jameslinnell jameslinnell force-pushed the feature/PI-650-read_as_device branch 5 times, most recently from 4188a8d to 1c21964 Compare November 28, 2024 15:07
@megan-bower4 megan-bower4 changed the base branch from main to feature/PI-572-create_an_as_device November 29, 2024 09:14
Comment on lines +84 to +93
for key, filters in device.device_reference_data.items():
for drd in device_reference_data_list:
if str(drd.id) == key:
for responses in drd.questionnaire_responses.values():
for qresponse in responses:
if "*" not in filters:
qresponse.data = {
filter_key: qresponse.data[filter_key]
for filter_key in filters
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very heavily nested - although I've tried to look at it but not sure how to make it any simpler either, unless some of the logic is pulled out into a separate function for readability at least? Don't know if Joel would have any magic python ideas for this? He's improved a lot of my if statements/for loops before :)

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