Skip to content

Fix django4.1 compatibility issues with related fields

In Django4.1 a ValueError exception is raised when trying to access to foreign keys for unsaved model instances:

https://docs.djangoproject.com/en/4.1/releases/4.1/#reverse-foreign-key-changes-for-unsaved-model-instances

This patch ensures that everything is saved before trying to use related models and handles the exception correctly in the Thread model pre_save.

Merge request reports

Loading