'merge the old config with the new'

def save(self, **kwargs):

    try:
        previous_config = self.app.config_set.latest()
        for attr in [u'cpu', u'memory', u'tags', u'values']:
            try:
                data = getattr(previous_config, attr).copy()
            except AttributeError:
                data = {}
            try:
                new_data = getattr(self, attr).copy()
            except AttributeError:
                new_data = {}
            data.update(new_data)
            [data.pop(k) for (k, v) in new_data.viewitems() if (v is None)]
            setattr(self, attr, data)
    except Config.DoesNotExist:
        pass
    return super(Config, self).save(**kwargs)
