Skip to content

Commit

Permalink
fix stats page user count
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderGi authored and devxpy committed Aug 28, 2024
1 parent 3f66004 commit 1b3cbd3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bots/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,6 @@ class Conversation(models.Model):
"web_user_id",
"wa_phone_number",
"twilio_phone_number",
"id",
]

class Meta:
Expand Down Expand Up @@ -1135,10 +1134,9 @@ def get_display_name(self):

def unique_user_id(self) -> str | None:
for col in self.user_id_fields:
if col == "id":
return self.api_integration_id()
if value := getattr(self, col, None):
return value
return self.api_integration_id()

get_display_name.short_description = "User"

Expand Down

0 comments on commit 1b3cbd3

Please sign in to comment.