Fix DeprecationWarning: on_change argument is deprecated, use the depends decorator

This commit is contained in:
jmartin 2014-05-21 17:23:37 +02:00
parent 86f942dd7c
commit d0edae7d3f
1 changed files with 2 additions and 2 deletions

View File

@ -17,12 +17,12 @@ class Address:
cls.zip.on_change = []
for field in ('zip', 'country'):
if not field in cls.zip.on_change:
cls.zip.on_change.append(field)
cls.zip.on_change.add(field)
if cls.country.on_change is None:
cls.country.on_change = []
for field in ('zip', 'country'):
if not field in cls.country.on_change:
cls.country.on_change.append(field)
cls.country.on_change.add(field)
@staticmethod
def default_country():