(self, couch_object)
Copy data from the SQL model to the Couch model and save it
Copy data from the SQL model to the Couch model and save it
Copy data from the SQL model to the Couch model and save it
def _migration_sync_to_couch(self, couch_object):
        """Copy data from the SQL model to the Couch model and save it"""
        for field_name in self._migration_get_fields():
            value = getattr(self, field_name)
            setattr(couch_object, field_name, value)
        self._migration_sync_submodels_to_couch(couch_object)
        for custom_func in self._migration_get_custom_sql_to_couch_functions():
            custom_func(self, couch_object)
        couch_object.save(sync_to_sql=False)
def _migration_sync_to_couch ( self , couch_object ) : for field_name in self . _migration_get_fields ( ) : value = getattr ( self , field_name ) setattr ( couch_object , field_name , value ) self . _migration_sync_submodels_to_couch ( couch_object ) for custom_func in self . _migration_get_custom_sql_to_couch_functions ( ) : custom_func ( self , couch_object ) couch_object . save ( sync_to_sql = False )