update django/celery

This commit is contained in:
j 2023-07-27 15:35:53 +02:00
commit c80f16c77a
8 changed files with 21 additions and 20 deletions

View file

@ -5,12 +5,12 @@ import copy
from django.db import models
from django.utils import datetime_safe
import django.contrib.postgres.fields
from django.core.serializers.json import DjangoJSONEncoder
from ox.utils import json
class JSONField(django.contrib.postgres.fields.JSONField):
class JSONField(models.JSONField):
def __init__(self, *args, **kwargs):
if 'encoder' not in kwargs:

View file

@ -37,12 +37,12 @@ class NullsLastQuery(Query):
obj.nulls_last = self.nulls_last
return obj
def get_compiler(self, using=None, connection=None):
def get_compiler(self, using=None, connection=None, elide_empty=True):
if using is None and connection is None:
raise ValueError("Need either using or connection")
if using:
connection = connections[using]
return NullLastSQLCompiler(self, connection, using)
return NullLastSQLCompiler(self, connection, using, elide_empty)
class QuerySet(django.db.models.query.QuerySet):