Fixes #19520: restores ability to set Prefix.scope via API (#19588)

This commit is contained in:
Jason Novinger
2025-05-27 12:32:36 -05:00
committed by GitHub
parent a97b438b7e
commit cc099e86e1
2 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ class CachedScopeMixin(models.Model):
abstract = True
def clean(self):
if self.scope_type and not self.scope:
if self.scope_type and not (self.scope or self.scope_id):
scope_type = self.scope_type.model_class()
raise ValidationError({
'scope': _(