Ejemplo n.º 1
0
 def __setstate__(self, data):
     # This restores the password from its previous location as a top level setting
     # after it was moved under the auth group.
     SettingsObject.__setstate__(self, data)
     if not data.get('auth', {}).get('password') and data.get('password'):
         self.auth.password = data.pop('password')
         self.save()
Ejemplo n.º 2
0
 def __setstate__(self, data):
     # This restores the password from its previous location as a top level setting
     # after it was moved under the auth group.
     SettingsObject.__setstate__(self, data)
     if not data.get('auth', {}).get('password') and data.get('password'):
         self.auth.password = data.pop('password')
         self.save()