-
-
Notifications
You must be signed in to change notification settings - Fork 396
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
Remove rectify weirdness on surveys #3055
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3055 +/- ##
==========================================
+ Coverage 98.59% 98.59% +<.01%
==========================================
Files 1716 1717 +1
Lines 40967 40980 +13
==========================================
+ Hits 40393 40406 +13
Misses 574 574 |
@deivid-rodriguez this hotfix has the test suite passing! 🎉 Should we wait until the |
b07406c
to
bf5abae
Compare
I think it's better to ship the monkeypatch for now so I can keep working under sanity, and also because |
The way surveys are structured made me introduce a nasty hack in the survey question form. However, now I'm adding new attributes to the form and I'm having trouble unit testing them since this form is now instantiated very weirdly. I discovered that this is actually something rectify just can't handle and I figured it's better to add support for it upstream. For now I'm adding the monkey patch here until the upstream PR is attended.
bf5abae
to
894e6c1
Compare
I simplified the patch to |
OK then, going in! |
🎩 What? Why?
Yesterday I almost went crazy figuring out why things were not working for our nested survey forms. I ended up adding two hacks to the answer form model to make it work:
However, these hacks are biting me now since I'm adding more attributes to this form, and I cannot easily unit test them, because the form is now instantiated wierdly.
I digged in a little deeper and it seems like a bug / missing feature in
rectify
to me: it only supports one-level nested forms. I added a fix for it in andypike/rectify#45, but I'm opening this PR monkeypatching it to see how the patch plays against the whole of decidim's test suite.With this, I can remove both hacks mentioned before.
📌 Related Issues
📋 Subtasks
None.
📷 Screenshots (optional)
None.