django-cms / djangocms-versioning

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

fix: Avoid duplication of placeholder checks for locked versions #393

Closed fsbraun closed 8 months ago

fsbraun commented 8 months ago

Description

djangocms-versioning adds default_checks to placeholders to avoid changing content of published objects. The checks for locked versions were added for every versioned model, but only need adding once.

This PR moves adding the check for locked versions from cms_config.py to apps.py, where it is only done once.

Related resources

Checklist

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.60%. Comparing base (f90c5b2) to head (0094662). Report is 12 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #393 +/- ## ========================================== + Coverage 90.88% 91.60% +0.71% ========================================== Files 72 72 Lines 2546 2573 +27 Branches 361 366 +5 ========================================== + Hits 2314 2357 +43 + Misses 168 153 -15 + Partials 64 63 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.