'Return the version of the given database representation of a block.'

def _get_version(self, block):

    source_version = block.edit_info.source_version
    return (source_version if (source_version is not None) else block.edit_info.update_version)
