#3698 (Must propagate inject_field() also to MTI children)
by Luc Saffre · in Developers · assigned to Luc Saffre
Summary
pm prep is failing in noereth (presto) with this "Worker has no field named 'purchase_account_id'".
Children
Comments
- 6 years, 4 months ago by Luc Saffre about #3698 (Must propagate inject_field() also to MTI children) : I think I got it. This was a good one. After injecting a database field to a model, we must also fix the cache of MTI children of this model. This problem was always there and it was coincidence that this situation came now for the first time.
- 6 years, 4 months ago by Luc Saffre about #3698 (Must propagate inject_field() also to MTI children) : I tried with different versions and found that the problem has been introducted by my patch [url github.com/lino-framework/xl/commit/a5cab7a46d31462e7a55a87115662dd78f4a34a9].
- 6 years, 4 months ago by Luc Saffre about #3698 (Must propagate inject_field() also to MTI children) : I took it back and will work on this now. Because it might get urgent soon.
- 6 years, 4 months ago by Luc Saffre about #3698 (Must propagate inject_field() also to MTI children) : Difficult to debug? It is easily reproducible from the command line: just say "go noereth" and then "inv prep".
- 6 years, 4 months ago by tonis about #3698 (Must propagate inject_field() also to MTI children) : Could the issue be from a migration file? As prep is broken, this is going to be interesting to debug as we can't use shell...
- 6 years, 4 months ago by Luc Saffre about #3698 (Must propagate inject_field() also to MTI children) : Tonis or Hamza, feel free to take this ticket and work on it.
- 6 years, 4 months ago by Luc Saffre about #3698 (Must propagate inject_field() also to MTI children) : Note some special things to know about the purchase_account field: [url luc.lino-framework.org/blog/2020/0621.html]
- 6 years, 4 months ago by Luc Saffre about #3698 (Must propagate inject_field() also to MTI children) : This seems to be a good one. My first guess was to suspect the inject_field() function, which accesses undocumented Django internals and therefore might be broken. But the problem occurs also when I downgrade my Django to 2.2.5, so that's not the explanation.