-
Notifications
You must be signed in to change notification settings - Fork 707
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
Regression: SortableTabularInline re-ordering not persisting to db in v0.2.4 #152
Comments
Can you give some more info, version of Django and class definitions. Because Demo site is using v0.2.4 and SortableTabularInline works: |
Weird... I've been doing some more testing and tinkering and https://gist.github.com/adamJLev/6637178 django 1.5.4 |
Check if there is no JS errors or missing files in Developer Console. |
No errors in the console. Using Chrome latest. Not sure why it's only happening to some of the ModelAdmins though. |
You referenced whole JS file not the diff. Could you please post link to diff? |
Yeah my bad, this is it 435afaa |
Can you please try latest develop branch and see if your bug is still there or not.
|
@adamJLev Can you please check it with latest develop? I would really like to release new version with previous bug fixes and only this issue is holding me from doing that. Thanks |
Just tested, issue still happening with latest develop branch. |
default=0 new and empty extra inlines were not handled properly - order value was set which means admin tried to save empty inline
Please test with latest develop version. Since i can't reproduce i can't be 100% sure this fixed the problem. Thanks. |
Still no dice :( |
I'm having the exactly the same issue. I now tried the most recent developer-version, with no success. All my sortable-fields have the value 0 filled in. |
@dreipol can you please try to spot the difference why sometimes it is working and sometimes not (check html differences on inline dynamic rows, etc)? |
@dreipol nope, than can't be related, however apparently it is a separate bug, but it just disables wrong arrows and doesn't affect values. |
Ok. I'm just trying to figure out where the fault happens. Should the value of the sortable be set new, when the reordering happens or does it happen when one click save? And where is the new value assigned? |
Values for hidden order fields are assigned on form submit: The script updates order field (puts order values in hidden fields) in two cases:
|
@dreipol your inline screenshot and my latest comment gave me an idea, i think it is because there is just a checkbox in inline. I think i forgot to handled checkboxes and radios. |
Fix is on it's way :) |
Great. Actually the Checkbox You see there is the normal delete checkbox. |
database when all inlines fields were marked as readonly. Add better existing inline detection.
Please check latest develop branch:
|
Works like a charm! Thank you very much. |
Do you have any idea when the next version is released? |
In few minutes :) |
v0.2.5 is released and uploaded to pypi |
This works in v0.2.3, and I'm guessing this commit may be the issue:
435afaa
Full compare between versions:
8f98158...22fbc80
Cheers 🍻
The text was updated successfully, but these errors were encountered: