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

Enhance Query String Parsing for Server-Side Binding in Django 4.2 with psycopg 3.1.8+ Resolves #234 #235

Merged
merged 5 commits into from
Dec 9, 2023

Conversation

truongvan
Copy link
Contributor

My implementation for Issue #234.

truongvan and others added 3 commits December 4, 2023 11:36
- Removed:
  - Previous try-except block converting string to int, defaulting to string on failure.

- Added:
  - Enhanced parsing logic:
    - Converts string to int if `isdigit()` is true.
    - Converts string to boolean if it matches "true" or "false" (case sensitive).
    - Otherwise, retains the string as is.
dj_database_url/__init__.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Dec 9, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9a74cc5) 100.00% compared to head (cec0b29) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #235   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           73        75    +2     
  Branches        16        18    +2     
=========================================
+ Hits            73        75    +2     

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

@palfrey palfrey merged commit 0879f12 into jazzband:master Dec 9, 2023
14 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