-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
core: used_by: handle NotImplementedError in used_by endpoint #13588
base: main
Are you sure you want to change the base?
Conversation
The used_by endpoint was failing when inspecting model members because it tried to access properties that might raise NotImplementedError (like the component property in Source models). This fix changes the member inspection to first get all members and then filter them, rather than using a predicate function that tries to access each property. The endpoint will still show all objects that reference the queried object, but it will do so without trying to access properties that might raise exceptions. Closes goauthentik#13587
❌ Deploy Preview for authentik-docs failed. Why did it fail? →
|
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13588 +/- ##
==========================================
+ Coverage 92.68% 92.74% +0.06%
==========================================
Files 794 794
Lines 40479 40496 +17
==========================================
+ Hits 37518 37560 +42
+ Misses 2961 2936 -25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
what? I didn't change docs at all. Will ignore |
The error you're seeing is probably a symptom of a missing UsedByMixin on a serializer. Do you know which model this is failing on? |
The used_by endpoint was failing when inspecting model members because it tried
to access properties that might raise NotImplementedError (like the component
property in Source models).
This fix changes the member inspection to first get
all members and then filter them, rather than using a predicate function that
tries to access each property.
The endpoint will still show all objects that reference the queried object, but
it will do so without trying to access properties that might raise exceptions.
Closes #13587<!--
👋 Hi there! Welcome.
Please check the Contributing guidelines: https://docs.goauthentik.io/docs/developer-docs/#how-can-i-contribute
-->
Details
REPLACE ME
Checklist
ak test authentik/
)make lint-fix
)If an API change has been made
make gen-build
)If changes to the frontend have been made
make web
)If applicable
make website
)