Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Preview link language #357

Merged
merged 17 commits into from
Nov 16, 2023
Merged

Conversation

fsbraun
Copy link
Member

@fsbraun fsbraun commented Oct 24, 2023

Description

This PR fixes an issue with the preview links falling back to the primary language.

  • No more jumping between languages when clicking preview in the version admin
  • Comparing pages not of the primary language works

Related resources

  • #...
  • #...

Checklist

  • I have opened this pull request against master
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined #workgroup-pr-review on
    Slack to find a “pr review buddy” who is going to review my pull request.

@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (97f2801) 90.86% compared to head (5a41f0e) 90.95%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #357      +/-   ##
==========================================
+ Coverage   90.86%   90.95%   +0.08%     
==========================================
  Files          72       72              
  Lines        2530     2533       +3     
  Branches      356      356              
==========================================
+ Hits         2299     2304       +5     
+ Misses        170      168       -2     
  Partials       61       61              
Files Coverage Δ
djangocms_versioning/admin.py 90.75% <100.00%> (+0.05%) ⬆️
djangocms_versioning/cms_config.py 80.36% <100.00%> (ø)
djangocms_versioning/cms_menus.py 79.38% <ø> (ø)
djangocms_versioning/indicators.py 98.18% <ø> (+6.51%) ⬆️
djangocms_versioning/helpers.py 90.27% <60.00%> (-0.85%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

djangocms_versioning/cms_toolbars.py Outdated Show resolved Hide resolved
tests/test_admin.py Outdated Show resolved Hide resolved
@@ -26,6 +26,13 @@
emit_content_change = None


def is_editable(content_obj, request):
"""Check of content_obj is editable"""
from .models import Version

Check notice

Code scanning / CodeQL

Cyclic import Note

Import of module
djangocms_versioning.models
begins an import cycle.
flake8
isort
py{39.310,311}-dj{32,40,41}-sqlite
ruff
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the ruff config? I may be missing something, but can't see it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marksweb The ruff config resides in pyproject.toml. I just added the ruff dependency to the testing requirements for easier testing. Transition to ruff was in #329

@marksweb
Copy link
Member

Ok the change here looks good. We just need some further fixes for 3.12 so maybe that should be it's own PR to introduce that and fix the issues so we get a clean run of checks for this?

@fsbraun
Copy link
Member Author

fsbraun commented Nov 16, 2023

@marksweb @vinitkumar The 3.12 issues reside in django-app-helper. From my side we can merge this.

@marksweb
Copy link
Member

Ok that's fair 👍

@fsbraun fsbraun merged commit fd49df6 into django-cms:master Nov 16, 2023
43 of 56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants