Title: Feb 10 change to ldap_attribute_store.py broke 'no ldap record found'. · Issue #488 · IdentityPython/SATOSA · GitHub
Open Graph Title: Feb 10 change to ldap_attribute_store.py broke 'no ldap record found'. · Issue #488 · IdentityPython/SATOSA
X Title: Feb 10 change to ldap_attribute_store.py broke 'no ldap record found'. · Issue #488 · IdentityPython/SATOSA
Description: Previously there was a section of code that started on line 586 which handles whether or not an LDAP record was found. It takes the following format. if record: ... else: ... On the commit found here: 4b9c83b That got nested under a for ...
Open Graph Description: Previously there was a section of code that started on line 586 which handles whether or not an LDAP record was found. It takes the following format. if record: ... else: ... On the commit found he...
X Description: Previously there was a section of code that started on line 586 which handles whether or not an LDAP record was found. It takes the following format. if record: ... else: ... On the commit found he...
Opengraph URL: https://github.com/IdentityPython/SATOSA/issues/488
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Feb 10 change to ldap_attribute_store.py broke 'no ldap record found'.","articleBody":"Previously there was a section of code that started on line 586 which handles whether or not an LDAP record was found. It takes the following format.\n```\nif record:\n ...\nelse:\n ...\n```\n\nOn the commit found here: https://github.com/IdentityPython/SATOSA/commit/4b9c83b966392c3f732a6a85c63994e6f832643e \nThat got nested under a for loop in attempt to process multiple records like such:\n```\nfor record in responses:\n if record:\n ...\n else:\n ...\n```\n\nThe problem is that if no record exists in responses, the else clause will never be executed, because the for loop will be entirely skipped. (That is of course after you get passed the error of 'responses' not being assigned: \"UnboundLocalError: local variable 'responses' referenced before\").\n\nIt's likely that it was intended to be something like below instead.\n```\n# Address responses being an Unboundlocal when no record is found, then...\n\nif responses:\n for record in responses:\n ...\nelse:\n ...\n```\n\nI've posted the Pull Request to resolve this: [Fix for issue 488](https://github.com/IdentityPython/SATOSA/pull/489)","author":{"url":"https://github.com/aaschenbrener","@type":"Person","name":"aaschenbrener"},"datePublished":"2025-04-24T15:00:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/488/SATOSA/issues/488"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3ddecd61-7702-1767-e269-c970be9c03ef |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 96CA:34DEC:5326A0:74A1D4:6970AA7C |
| html-safe-nonce | b0d96c234e157fc7c1adc9dee97cf06feb6e71f4a7a18aba3a0e2b1d17d00b4e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NkNBOjM0REVDOjUzMjZBMDo3NEExRDQ6Njk3MEFBN0MiLCJ2aXNpdG9yX2lkIjoiMjA3MDAxMzkwMzAxNjg2NDM4MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c12c3333a717cc303fd2397b0ef68a1e4fa55b0d87a6b5295c36086d6ea95688 |
| hovercard-subject-tag | issue:3017586949 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IdentityPython/SATOSA/488/issue_layout |
| twitter:image | https://opengraph.githubassets.com/065a0684de5379b84ee5cf3774f6d143bb860de101dfc61be0a55bc4905cd923/IdentityPython/SATOSA/issues/488 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/065a0684de5379b84ee5cf3774f6d143bb860de101dfc61be0a55bc4905cd923/IdentityPython/SATOSA/issues/488 |
| og:image:alt | Previously there was a section of code that started on line 586 which handles whether or not an LDAP record was found. It takes the following format. if record: ... else: ... On the commit found he... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aaschenbrener |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5246860f280a060af866c1c633f74a6720ad2dd5d576534e4c5e462496b693ae |
| turbo-cache-control | no-preview |
| go-import | github.com/IdentityPython/SATOSA git https://github.com/IdentityPython/SATOSA.git |
| octolytics-dimension-user_id | 29101624 |
| octolytics-dimension-user_login | IdentityPython |
| octolytics-dimension-repository_id | 41785805 |
| octolytics-dimension-repository_nwo | IdentityPython/SATOSA |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 41785805 |
| octolytics-dimension-repository_network_root_nwo | IdentityPython/SATOSA |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7d29ab0ba8deb7bbecf06b664759d4e847623783 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width