Skip to content

Commit

Permalink
Merge pull request #13 from intuitem/fix-regression-on-library-loading
Browse files Browse the repository at this point in the history
Revert "fix: unit test folder name used checking" (CA-137)
  • Loading branch information
eric-intuitem authored Oct 18, 2023
2 parents 6f45f5a + 4365252 commit 246f6cb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 28 deletions.
11 changes: 1 addition & 10 deletions core/base_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,7 @@ class Meta:

def __str__(self) -> str:
return self.name

def clean(self) -> None:
scope = self.get_scope()
field_errors = {}
_fields_to_check = self.fields_to_check if hasattr(self, 'fields_to_check') else ['name']
if not self.is_unique_in_scope(scope=scope, fields_to_check=_fields_to_check):
field_errors['name'] = _('This name is already in use.')
super().clean()
if field_errors:
raise ValidationError(field_errors)


class AbstractBaseModel(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
Expand Down
17 changes: 0 additions & 17 deletions core/migrations/0018_alter_evidence_options.py

This file was deleted.

2 changes: 1 addition & 1 deletion iam/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def _get_root_folder():
return None


class Folder(I18nMixin, NameDescriptionMixin, AbstractBaseModel):
class Folder(AbstractBaseModel, I18nMixin, NameDescriptionMixin):
""" A folder is a container for other folders or any object
Folders are organized in a tree structure, with a single root folder
Folders are the base perimeter for role assignments
Expand Down

0 comments on commit 246f6cb

Please sign in to comment.