Delete attached file with given resource identifier from a mode run.

        Raise ValueError if an image archive with the given resource identifier
        is attached to the model run instead of a data file.

        Parameters
        ----------
        identifier : string
            Unique model run identifier
        resource_id : string
            Unique attachment identifier

        Returns
        -------
        boolean
            True, if file was deleted. False, if no attachment with given
            identifier existed.

def delete_data_file_attachment(self, identifier, resource_id):
        """Delete attached file with given resource identifier from a mode run.

        Raise ValueError if an image archive with the given resource identifier
        is attached to the model run instead of a data file.

        Parameters
        ----------
        identifier : string
            Unique model run identifier
        resource_id : string
            Unique attachment identifier

        Returns
        -------
        boolean
            True, if file was deleted. False, if no attachment with given
            identifier existed.
        """
        # Get model run to ensure that it exists. If not return False
        model_run = self.get_object(identifier)
        if model_run is None:
            return False
        # Ensure that attachment with given resource identifier exists.
        if not resource_id in model_run.attachments:
            return False
        # Delete file on disk
        os.remove(os.path.join(model_run.attachment_directory, resource_id))
        # Update model run information in the database
        del model_run.attachments[resource_id]
        self.replace_object(model_run)
        return True