From fda94468d8f20a8a091cda295a8b00f821708733 Mon Sep 17 00:00:00 2001 From: Justin Zhang Date: Wed, 6 Sep 2023 23:24:49 -0400 Subject: [PATCH] Switch order of Group model str representation for easier search --- backend/gsr_booking/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/gsr_booking/models.py b/backend/gsr_booking/models.py index 002088b4..7e9e2d32 100644 --- a/backend/gsr_booking/models.py +++ b/backend/gsr_booking/models.py @@ -78,7 +78,7 @@ class Group(models.Model): MEMBER = "M" def __str__(self): - return f"{self.pk}: {self.name}" + return f"{self.name}-{self.pk}" def has_member(self, user): memberships = GroupMembership.objects.filter(group=self, user=user)