forked from 0x2620/pandora
update django/celery
This commit is contained in:
parent
d4df903f82
commit
c80f16c77a
8 changed files with 21 additions and 20 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue