Skip to content

Commit

Permalink
Remove code for cleaning up asset.data_stream references.
Browse files Browse the repository at this point in the history
  • Loading branch information
mstenta committed Jan 19, 2022
1 parent ac536bc commit 2aac4f1
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions modules/core/data_stream/data_stream.module
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,6 @@ function data_stream_data_stream_view_alter(array &$build, DataStreamInterface $
*/
function data_stream_data_stream_delete(DataStreamInterface $data_stream) {

// @todo Considerations for improved entity reference integrity?
// Remove any references to this data stream from the asset.data_stream field.
\Drupal::database()->delete('asset__data_stream')
->condition('data_stream_target_id', $data_stream->id())
->execute();

// If this is a "basic" data stream, delete data associated with it.
if ($data_stream->bundle() == 'basic' && !empty($data_stream->id())) {
\Drupal::database()->delete('data_stream_basic')
Expand Down

0 comments on commit 2aac4f1

Please sign in to comment.