fix a regression caused by #271#273
Conversation
... to keep the nomenclature consistent with the `CANCELED` state. Related: release-engineering#271
... to eliminate the following failure while applying migrations: ``` + osh/hub/manage.py migrate SystemCheckError: System check identified some issues: ERRORS: hub.Task.cancelled_by: (fields.E304) Reverse accessor 'User.task_set' for 'hub.Task.cancelled_by' clashes with reverse accessor for 'hub.Task.owner'. HINT: Add or change a related_name argument to the definition for 'hub.Task.cancelled_by' or 'hub.Task.owner'. hub.Task.owner: (fields.E304) Reverse accessor 'User.task_set' for 'hub.Task.owner' clashes with reverse accessor for 'hub.Task.cancelled_by'. HINT: Add or change a related_name argument to the definition for 'hub.Task.owner' or 'hub.Task.cancelled_by'. ``` Related: release-engineering#271 Related: openscanhub/openscanhub#317 Closes: release-engineering#273
|
I have verified that the proposed changes fix the OpenScanHub CI: https://github.com/openscanhub/openscanhub/actions/runs/14106246494?pr=317 |
|
Hi Kamil, looks like I was a little too slow. I arrived at mostly the same fix and verified it on a fork of OpenScanHub too. The main difference is I set the related_name to "+" which according to the Django docs tells it not to set up a backwards relation. Either will do the job though. Edit: on reflection, I think it'll be better to go with the name you've added rather than "+". It'll keep the related_name values in the Task class consistent. |
|
@amcmahon-rh Thank you for looking into this! I am fine with both the variants. Please let me know if you prefer the |
|
Lets go with your version. It'll be more consistent and avoid potential confusion down the line. |
|
Thank you both for review! Could you please merge this? I do not have write access myself. |
See the individual commit messages for details.