Skip to content

Commit

Permalink
Fixes ubccr#603
Browse files Browse the repository at this point in the history
  • Loading branch information
lcrownover committed Mar 20, 2024
1 parent 4897bd6 commit f24c5fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion coldfront/core/allocation/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,11 @@ def has_perm(self, user, perm):
return perm in perms

def __str__(self):
return "%s (%s)" % (self.get_parent_resource.name, self.project.pi)
parent_resource = self.get_parent_resource
parent_resource_name = "No Resources"
if parent_resource is not None:
parent_resource_name = parent_resource.name
return "%s (%s)" % (parent_resource_name, self.project.pi)

class AllocationAdminNote(TimeStampedModel):
""" An allocation admin note is a note that an admin makes on an allocation.
Expand Down

0 comments on commit f24c5fe

Please sign in to comment.