Whitehall.attachment_notifier.tap do |notifier|
  notifier.subscribe do |_event, attachment|
    if attachment.attachable.is_a?(PolicyGroup)
      ServiceListeners::AttachmentDraftStatusUpdater
        .new(attachment)
        .update!
    end
  end
end

Whitehall.attachment_notifier.tap do |notifier|
  notifier.subscribe do |_event, attachment|
    ServiceListeners::AttachmentDraftStatusUpdater
      .new(attachment)
      .update!
  end
end

Update draft status of assets for *all* attachment events
Update draft status of assets for *all* attachment events

After some discussion with @chrisroos, we agreed that, although it's not
necessary to pass the tests, by removing the condition which checks the
type of the associated Attachable, we can make the code more robust.

For example, at the moment, it's not possible to add an attachment to an
outcome on a published consultation via the user interface. It's
conceivable that the user interface might change in the future to allow
this at which point the draft status of the attachment assets would
*not* have been updated. With this change in place, the draft status
would be updated.

Note that this advantage comes at the cost of potentially generating a
large number of AssetManagerUpdateAssetWorker jobs. However, we're
guessing that this shouldn't cause a problem.

As discussed with @chrisroos, I haven't added a test to force this
change, because all I'm really doing is removing an optimisation.
