fix records field: accept None as (old) value
This commit is contained in:
parent
8cbe50a90b
commit
b82bf879fd
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 Helmut Merz helmutm@cy55.de
|
# Copyright (c) 2013 Helmut Merz helmutm@cy55.de
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -148,7 +148,7 @@ class RecordsFieldInstance(GridFieldInstance):
|
||||||
if not value:
|
if not value:
|
||||||
value = []
|
value = []
|
||||||
result = []
|
result = []
|
||||||
oldValue = getattr(self.clientContext, self.name, [])
|
oldValue = getattr(self.clientContext, self.name, None) or []
|
||||||
for idx, row in enumerate(value):
|
for idx, row in enumerate(value):
|
||||||
item = self.unmarshallRow(row, idx)
|
item = self.unmarshallRow(row, idx)
|
||||||
if item:
|
if item:
|
||||||
|
|
Loading…
Add table
Reference in a new issue