django-cms / djangocms-versioning

General purpose versioning package for Django CMS 4 and above.
Other
33 stars 29 forks source link

Unlocking a page raises exception #367

Closed jrief closed 5 months ago

jrief commented 5 months ago

In djangocms_versioning/admin.py:1276 (unlock_view) the function notify_version_author_version_unlocked is called which itself attempts to send an email to the user owning the lock.

However, if the project configuration does not configure an email backend, then this function can't connect and raises

OSError: [Errno 101] Network is unreachable.

In my opinion, such a network issue shall be logged but not cause an internal server error.

fsbraun commented 5 months ago

And, if no email backend is configured, it should not even try? (I.e. logs are not bloated with failed notifications if none are configured).