Skip to content

Commit 6a61353

Browse files
committed
Fix OrderedModel warning by adjusting manager setup in SponsorshipBenefit and updating .gitignore
1 parent 7a8bd53 commit 6a61353

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ __pycache__
2727
.DS_Store
2828
.envrc
2929
.state/
30+
venv/

sponsors/models/sponsorship.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
"""
23
This module holds models related to the Sponsorship entity.
34
"""
@@ -17,7 +18,7 @@
1718
from django.utils.functional import cached_property
1819
from num2words import num2words
1920

20-
from ordered_model.models import OrderedModel
21+
from ordered_model.models import OrderedModel, OrderedModelManager
2122

2223
from sponsors.exceptions import SponsorWithExistingApplicationException, InvalidStatusException, \
2324
SponsorshipInvalidDateRangeException
@@ -37,7 +38,12 @@ class SponsorshipPackage(OrderedModel):
3738
"""
3839
Represent default packages of benefits (visionary, sustainability etc)
3940
"""
40-
objects = SponsorshipPackageQuerySet.as_manager()
41+
42+
objects = OrderedModelManager()
43+
44+
45+
46+
4147

4248
name = models.CharField(max_length=64)
4349
sponsorship_amount = models.PositiveIntegerField()
@@ -407,6 +413,7 @@ class SponsorshipBenefit(OrderedModel):
407413
Benefit that sponsors can pick which are organized under
408414
package and program.
409415
"""
416+
410417

411418
objects = SponsorshipBenefitQuerySet.as_manager()
412419

0 commit comments

Comments
 (0)