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: Some id were localized in the templates #1350

Merged
merged 5 commits into from
Jun 6, 2023

Conversation

fsbraun
Copy link
Member

@fsbraun fsbraun commented Jun 5, 2023

Description

This fixes issue #1335.

A similar change has been merged into django cms core (django-cms/django-cms#7188)

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 Jun 5, 2023

Codecov Report

Merging #1350 (69790ec) into master (b7ee617) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1350   +/-   ##
=======================================
  Coverage   72.39%   72.39%           
=======================================
  Files          72       72           
  Lines        3268     3268           
  Branches      532      532           
=======================================
  Hits         2366     2366           
  Misses        735      735           
  Partials      167      167           

Copy link
Member

@vinitkumar vinitkumar left a comment

Choose a reason for hiding this comment

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

Looks good to me. Let's get this merged and released 🚢 🚀

Copy link
Contributor

@ivarsg ivarsg left a comment

Choose a reason for hiding this comment

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

In order to solve issue #1335, I propose to use string literal within JavaScript code instead of integer literal. In case if PK value exceeds JavaScript Number.MAX_SAFE_INTEGER value, integer literal will be rounded, thus value passed to the target function will be different from the actual PK value.

@fsbraun
Copy link
Member Author

fsbraun commented Jun 5, 2023

@ivarsg Wow, you really push the database!

Copy link
Member

@marksweb marksweb left a comment

Choose a reason for hiding this comment

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

Looks good to me and cleans up the JS nicely 👍

@fsbraun fsbraun merged commit 34803bc into django-cms:master Jun 6, 2023
@fsbraun fsbraun deleted the fix/unlocalize_ids branch June 28, 2023 16:58
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.

4 participants