Replace the FK towards Document on OcrModel by a M2M relation
Closes #353 (closed)
This MR implements the refactoring of the OcrModel.document
ForeignKey into a ManyToMany relation towards Document
instances:
- I generated a core migration (
0045
) to implement the M2M relation aswell as theOcrModelDocument
M2M "through" model. Note that this migration also uses aRunPython
function to migrate existingOcrModel.document
links to match the new schema. - I filled the Django Administration Panel with the new model (
OcrModelDocument
) and added some inlines onDocument
andOcrModel
to easily browse relations. - Last, I fixed all broken behaviors introduced by previous changes.
Merge request reports
Activity
added 1 commit
- 406d8cab - Fix all broken behaviours introduced by the previous commit
- Resolved by Eva Bardou
requested review from @rtissot
- Resolved by Eva Bardou
- Resolved by Eva Bardou
- Resolved by Eva Bardou
Haven't tested yet but the code is clean, I made two small remarks.
Sorry for the missing migration, it was dealt with in the Project PR but I should just have pushed it in develop.
mentioned in commit 48c706b7