def is_inserted_to_database()

in assets/assets/utils/common_utils.py [0:0]


    def is_inserted_to_database(self) -> bool:
        """
        Checks if file metadata has been inserted into database
        """
        logger_.debug(f"Checking is_inserted_to_database {self.file_name}")

        if self.converted_file is None:
            file_to_upload = self.file_bytes
            file_name = self.file_name
            ext = self.ext
            original_ext = None
        else:
            file_to_upload = self.converted_file
            file_name = self.file_name
            ext = self.converted_file_ext
            original_ext = self.ext
        self.updated = db.service.update_file(
            self.new_file.id,
            self.session,
            file_name,
            self.storage.tenant,
            get_file_size(file_to_upload),
            ext,
            original_ext,
            get_mimetype(file_to_upload),
            get_pages(file_to_upload, ext),
            schemas.FileProcessingStatus.UPLOADING,
        )
        if self.new_file:
            return True
        self.response = to_dict(
            id_=None,
            action=self.action,
            action_status=False,
            message="Database error",
            name=self.file_name,
        )
        return False