adding check to update statement to avoid failure on update from None

This commit is contained in:
Blake Eggleston
2013-05-09 10:56:57 -07:00
parent 65bd34f44e
commit c7f9a6d937

View File

@@ -600,6 +600,8 @@ class Map(BaseContainerColumn):
prev = self.to_database(prev)
if isinstance(val, self.Quoter): val = val.value
if isinstance(prev, self.Quoter): prev = prev.value
val = val or {}
prev = prev or {}
#get the updated map
update = {k:v for k,v in val.items() if v != prev.get(k)}