Skip to content
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

Fix exclude_fields_in_copy with DeferringRelatedManager object #11809

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

elhussienalmasri
Copy link
Contributor

@elhussienalmasri elhussienalmasri commented Apr 1, 2024

Fixes #11715

After Before
After Before

Copy link

squash-labs bot commented Apr 1, 2024

Manage this branch in Squash

Test this branch here: https://elhussienalmasrifix-exclude-fi-vxdps.squash.io

@lb-
Copy link
Member

lb- commented Apr 14, 2024

@elhussienalmasri are you able to add unit tests for this change. The tests should fail before this change and pass after it. So that we don't break this again in the future.

@elhussienalmasri
Copy link
Contributor Author

sure @lb- , it a bit complicated because its require DeferringRelatedManager object , but I will try to find similar unit test , and I will add unit test for this PR asap.

@elhussienalmasri
Copy link
Contributor Author

I added @lb- the unit test , and I make migration for "RelatedManager" ( MultipleChooserPanel) object manually because when I tried to automatically run migrations some error occurs , so I had to make it manually ,so if you know how to make it automatically without any error, please let me know and I will update this PR , also I just added one unit test so if you have other suggestions about unit tests please let me know.

@elhussienalmasri
Copy link
Contributor Author

elhussienalmasri commented Apr 17, 2024

when I run migration before I add any code this error occurs editor = editor_settings[name] KeyError: 'custom' , and after
this error occurred:
Screenshot,
may it because I added two " MultipleChooserPanel" but I want to run migration automatically and solve the first error.
I just said that to take into consideration when review this PR, by the way I only want t add " MultipleChooserPanel" to
exclude object " PageWithExcludedCopyField" , may if I can run migration automatically , may I find solution to this issue,
so any idea how to run migration automatically.
I tested this issues again and it exist before this PR, the first issue "editor" in the same page cause this issue. and the second issue may be solved, by replace the "related_name" to one of them, this make conflict, and cause this issue. but I don ,t test this solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants