collective / collective/wildcard.fixpersistentutilities

reg_dottedname incorrectly using InterfaceClass

Open
#4 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5
Forks
7
PR merge metrics
No merged PRs in 30d

Description

In views.py line 182, I am not entirely sure why you are using ``reg_klass.__class__.__name__`` but it appears to be giving the wrong value here. It might be easier to explain with an example:

reg_klass:
dottedname = wicked.fieldevent.interfaces.InterfaceClass

It should be "wicked.fieldevent.interfaces.IFieldValueSetter". inspect.isclass expects a type in (, ) which type(reg_klass) does not satisfy. Maybe it should check if isinstance(reg_klass, InterfaceClass)?

`(Pdb) reg_klass

(Pdb) type(reg_klass)
`

If I correct the URL to fix the reg_dottedname I get the expected behavior.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at views.py line 182 and inspect how reg_klass is converted into reg_dottedname, using the reported InterfaceClass example as the failing case. Confirm that the generated URL uses the expected "wicked.fieldevent.interfaces.IFieldValueSetter" dotted name and verify the corrected URL produces the expected behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.