(self, sql_object)
Copy data from the Couch model to the SQL model and save it
Copy data from the Couch model to the SQL model and save it
Copy data from the Couch model to the SQL model and save it
def _migration_sync_to_sql(self, sql_object):
        """Copy data from the Couch model to the SQL model and save it"""
        for field_name in self._migration_get_fields():
            value = getattr(self, field_name)
            setattr(sql_object, field_name, value)
        self._migration_sync_submodels_to_sql(sql_object)
        for custom_func in self._migration_get_custom_couch_to_sql_functions():
            custom_func(self, sql_object)
        sql_object.save(sync_to_couch=False)
def _migration_sync_to_sql ( self , sql_object ) : for field_name in self . _migration_get_fields ( ) : value = getattr ( self , field_name ) setattr ( sql_object , field_name , value ) self . _migration_sync_submodels_to_sql ( sql_object ) for custom_func in self . _migration_get_custom_couch_to_sql_functions ( ) : custom_func ( self , sql_object ) sql_object . save ( sync_to_couch = False )