Use Null constant from python-sql for comparisons
issue4143 review13701003
This commit is contained in:
+3
-1
@@ -1,6 +1,8 @@
|
||||
#This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
#this repository contains the full copyright notices and license terms.
|
||||
'Address'
|
||||
from sql import Null
|
||||
|
||||
from trytond.model import ModelView, ModelSQL, fields
|
||||
from trytond.pyson import Eval, If
|
||||
from trytond.transaction import Transaction
|
||||
@@ -61,7 +63,7 @@ class Address(ModelSQL, ModelView):
|
||||
@staticmethod
|
||||
def order_sequence(tables):
|
||||
table, _ = tables[None]
|
||||
return [table.sequence == None, table.sequence]
|
||||
return [table.sequence == Null, table.sequence]
|
||||
|
||||
@staticmethod
|
||||
def default_active():
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
#this repository contains the full copyright notices and license terms.
|
||||
from sql import Null
|
||||
|
||||
from trytond.model import ModelView, ModelSQL, fields
|
||||
from trytond.pyson import Eval
|
||||
from trytond.transaction import Transaction
|
||||
@@ -102,7 +104,7 @@ class ContactMechanism(ModelSQL, ModelView):
|
||||
@staticmethod
|
||||
def order_sequence(tables):
|
||||
table, _ = tables[None]
|
||||
return [table.sequence == None, table.sequence]
|
||||
return [table.sequence == Null, table.sequence]
|
||||
|
||||
@staticmethod
|
||||
def default_type():
|
||||
|
||||
@@ -41,7 +41,7 @@ if minor_version % 2:
|
||||
'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % (
|
||||
name[8:], name, version))
|
||||
|
||||
requires = ['python-sql']
|
||||
requires = ['python-sql >= 0.4']
|
||||
for dep in info.get('depends', []):
|
||||
if not re.match(r'(ir|res|webdav)(\W|$)', dep):
|
||||
requires.append(get_require_version('trytond_%s' % dep))
|
||||
|
||||
Reference in New Issue
Block a user