fix: import unlock_options in ui_panels - panel Unlock button raised NameError [Better data collection] - #2302
Open
PetrDlouhy wants to merge 1 commit into
Open
fix: import unlock_options in ui_panels - panel Unlock button raised NameError [Better data collection]#2302PetrDlouhy wants to merge 1 commit into
PetrDlouhy wants to merge 1 commit into
Conversation
…sed NameError #2245 made the locked-asset detail panel call unlock_options.get_unlock_variant() but never imported the module into ui_panels, so drawing that branch raises NameError and the Unlock button is missing for every user who cannot download the asset. Released in v3.21.2.260907. The drag-and-drop dialog was unaffected (asset_drag_op imports the module). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2302 +/- ##
=======================================
Coverage 33.22% 33.23%
=======================================
Files 86 86
Lines 27246 27250 +4
=======================================
+ Hits 9053 9057 +4
Misses 18193 18193
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Production bug — the detail panel's Unlock button
#2245 made the locked-asset detail panel call
unlock_options.get_unlock_variant()(ui_panels.py:3807) but never importedunlock_optionsintoui_panels. Drawing that branch raisesNameError, so the "Unlock" button is missing for every user who cannot download the asset — the panel-side conversion path. Verified in the released tagv3.21.2.260907(in wide distribution since 2026-09-07 per telemetry).The drag-and-drop upsell dialog is unaffected:
asset_bar/asset_drag_op.pyimports the module.Nobody saw it because no test draws that panel branch and add-on draw errors don't reach Sentry. It surfaced through a test in #2301 that patches
ui_panels.unlock_options.Fix
One import line, plus a test that pins the module attribute so the reference cannot silently dangle again.
Note for #2296/#2301: #2301 carries the same line; a trivial same-line conflict on rebase.
🤖 Generated with Claude Code