From 7aa35b3fec222a5a9b006a0be6767cdedc05653f Mon Sep 17 00:00:00 2001
From: catch <catch@35733.no-reply.drupal.org>
Date: Thu, 17 Nov 2022 16:13:02 +0000
Subject: [PATCH] Issue #3260173 by andregp, joachim, tstoeckler, nod_: Media
 should set the owner field to anonymous if no explicit owner is set

---
 core/modules/media/src/Entity/Media.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/core/modules/media/src/Entity/Media.php b/core/modules/media/src/Entity/Media.php
index 76739dbe48d3..2170f91979bd 100644
--- a/core/modules/media/src/Entity/Media.php
+++ b/core/modules/media/src/Entity/Media.php
@@ -454,6 +454,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
 
     $fields['uid']
       ->setLabel(t('Authored by'))
+      ->setRequired(TRUE)
       ->setDescription(t('The user ID of the author.'))
       ->setRevisionable(TRUE)
       ->setDisplayOptions('form', [
-- 
GitLab