Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix OrderedModelManager warnings in Sponsorship models (#2743)#2760

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
MisbahAN wants to merge1 commit intopython:main
base:main
Choose a base branch
Loading
fromMisbahAN:issue-2743-fix-orderedmodelmanager

Conversation

@MisbahAN
Copy link

Overview

This PR resolves the warning(ordered_model.W003) for bothSponsorshipBenefit andSponsorshipPackage models. These models subclassOrderedModel but were previously using managers that did not inherit fromOrderedModelManager.

Changes Made

  • UpdatedSponsorshipPackage to useOrderedModelManager.from_queryset(SponsorshipPackageQuerySet)()
  • UpdatedSponsorshipBenefit to useOrderedModelManager.from_queryset(SponsorshipBenefitQuerySet)()
  • Added necessary import forOrderedModelManager

Why This Fixes the Warning

Using.as_manager() does not ensure that the resulting manager inherits fromOrderedModelManager, even if the queryset does. Using.from_queryset() ensures the manager inherits fromOrderedModelManager while preserving custom queryset functionality.

Fixes#2743

@MisbahAN
Copy link
Author

hi@JacobCoffee and@ewdurbin, just wanted to follow up on this PR (#2743) when you get a chance. This is my FIRST open-source contribution and I’d love any feedback or direction if anything needs to be changed. TYIA!!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ewdurbinewdurbinAwaiting requested review from ewdurbinewdurbin is a code owner

@JacobCoffeeJacobCoffeeAwaiting requested review from JacobCoffeeJacobCoffee is a code owner

At least 0 approving reviews are required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Tests: InvestigateOrderedModelManager warning for Sponsor models

1 participant

@MisbahAN

[8]ページ先頭

©2009-2025 Movatter.jp