diff --git a/django/cantusdb_project/main_app/management/commands/merge_indexer_user.py b/django/cantusdb_project/main_app/management/commands/merge_indexer_user.py index 435506bd3..4a70a8962 100644 --- a/django/cantusdb_project/main_app/management/commands/merge_indexer_user.py +++ b/django/cantusdb_project/main_app/management/commands/merge_indexer_user.py @@ -17,9 +17,6 @@ def handle(self, *args, **options): # set all users to be non-indexer first # those listed as indexers on old Cantus will have this adjusted to True user.is_indexer = False - # do not use the existing "name" property, - # because for some reason, the first/last names can have trailing spaces - # TODO: populate the full_name field and remove the "name" property if user.first_name or user.last_name: user.full_name = f"{user.first_name.strip()} {user.last_name.strip()}" else: diff --git a/django/cantusdb_project/users/models.py b/django/cantusdb_project/users/models.py index 560b62286..78df1cf2e 100644 --- a/django/cantusdb_project/users/models.py +++ b/django/cantusdb_project/users/models.py @@ -26,16 +26,9 @@ class User(AbstractUser): objects = CustomUserManager() - @property - def name(self): + def __str__(self): if self.full_name: return self.full_name - elif self.first_name and self.last_name: - return f'{self.first_name} {self.last_name}' - - def __str__(self): - if self.name: - return self.name else: return self.email