Merge branch 'Aufinal/no_warnings' into 'master'
Fix : plus de warnings chelous pendant les tests See merge request klub-dev-ens/gestioCOF!495
This commit is contained in:
commit
e36e88e77a
2 changed files with 3 additions and 1 deletions
|
@ -9,7 +9,7 @@ KFET_WAKES_UP_AT = time(5, 0) # La K-Fêt ouvre à 5h (UTC) du matin
|
||||||
def kfet_day(year, month, day, start_at=KFET_WAKES_UP_AT):
|
def kfet_day(year, month, day, start_at=KFET_WAKES_UP_AT):
|
||||||
"""Étant donné une date, renvoie un objet `datetime`
|
"""Étant donné une date, renvoie un objet `datetime`
|
||||||
correspondant au début du 'jour K-Fêt' correspondant."""
|
correspondant au début du 'jour K-Fêt' correspondant."""
|
||||||
return datetime.combine(date(year, month, day), start_at)
|
return datetime.combine(date(year, month, day), start_at, tzinfo=timezone.utc)
|
||||||
|
|
||||||
|
|
||||||
def to_kfet_day(dt, start_at=KFET_WAKES_UP_AT):
|
def to_kfet_day(dt, start_at=KFET_WAKES_UP_AT):
|
||||||
|
|
|
@ -11,6 +11,8 @@ from shared.autocomplete import ModelSearch
|
||||||
class Select2QuerySetView(ModelSearch, autocomplete.Select2QuerySetView):
|
class Select2QuerySetView(ModelSearch, autocomplete.Select2QuerySetView):
|
||||||
"""Compatibility layer between ModelSearch and Select2QuerySetView."""
|
"""Compatibility layer between ModelSearch and Select2QuerySetView."""
|
||||||
|
|
||||||
|
paginate_by = None
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
keywords = self.q.split()
|
keywords = self.q.split()
|
||||||
return super().search(keywords)
|
return super().search(keywords)
|
||||||
|
|
Loading…
Reference in a new issue