|
@@ -380,6 +380,12 @@ class ObjectPermissionForm(BootstrapMixin, forms.ModelForm):
|
|
|
constraints = [constraints]
|
|
constraints = [constraints]
|
|
|
for ct in object_types:
|
|
for ct in object_types:
|
|
|
model = ct.model_class()
|
|
model = ct.model_class()
|
|
|
|
|
+
|
|
|
|
|
+ if model._meta.model_name in ['script', 'report']:
|
|
|
|
|
+ raise forms.ValidationError({
|
|
|
|
|
+ 'constraints': _('Constraints are not supported for this object type.')
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
try:
|
|
try:
|
|
|
tokens = {
|
|
tokens = {
|
|
|
CONSTRAINT_TOKEN_USER: 0, # Replace token with a null user ID
|
|
CONSTRAINT_TOKEN_USER: 0, # Replace token with a null user ID
|