Skip to content

FEAT:Support 5.1-Removed Deprecated Fields #454

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

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

NandanaRaol
Copy link
Contributor

@NandanaRaol NandanaRaol commented Jun 3, 2025

This pull request includes a backward-compatible update to the _get_check_sql method in mssql/functions.py to support a new version of the Django framework.

Backward compatibility and version support:

  • Updated the _get_check_sql method to use self.condition when the Django version is 5.1 or higher, while retaining the use of self.check for older versions to ensure backward compatibility. (mssql/functions.py, mssql/functions.pyR380-R384)

@Copilot Copilot AI review requested due to automatic review settings June 3, 2025 18:58
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the _get_check_sql method to use the new condition attribute for CheckConstraint when running on Django 5.1+ while preserving backwards compatibility.

  • Introduces a version check to choose between self.condition and the deprecated self.check
  • Adds a clarifying comment above the new branch
Comments suppressed due to low confidence (1)

mssql/functions.py:385

  • Indentation of this line is inconsistent with the surrounding block and will cause a syntax error. Adjust it to align with the other statements inside the else (use 8 spaces before where).
        where = query.build_where(self.check)

@NandanaRaol NandanaRaol changed the title FIX:Support 5.2-Removed Deprecated Fields FIX:Support 5.1-Removed Deprecated Fields Jun 4, 2025
@NandanaRaol NandanaRaol changed the title FIX:Support 5.1-Removed Deprecated Fields FEAT:Support 5.1-Removed Deprecated Fields Jun 4, 2025
Copy link
Collaborator

@bewithgaurav bewithgaurav left a comment

Choose a reason for hiding this comment

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

Requesting changes for comment and a query. Else logic looks fine. Please merge with latest dev and rerun tests since one linux test broke (Shouldn't break now)

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