mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Monkey patch QPyNullVariant to be represented as 'NULL'
This commit is contained in:
parent
425b8b67d7
commit
cba57fa55a
@ -43,6 +43,10 @@ try:
|
||||
def __nonzero__(self):
|
||||
return False
|
||||
|
||||
def __repr__(self):
|
||||
return 'NULL'
|
||||
|
||||
QPyNullVariant.__nonzero__ = MethodType(__nonzero__, None, QPyNullVariant)
|
||||
QPyNullVariant.__repr__ = MethodType(__repr__, None, QPyNullVariant)
|
||||
except ImportError:
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user