Skip to content

Commit

Permalink
fix: Add missing f-string from app_analytics models (#3155)
Browse files Browse the repository at this point in the history
  • Loading branch information
zachaysan authored Dec 14, 2023
1 parent 919c823 commit 58d6589
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/app_analytics/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Resource(models.IntegerChoices):
def get_lowercased_name(cls, resource: int) -> str:
member = next(filter(lambda member: member.value == resource, cls), None)
if not member:
raise ValueError("Invalid resource: {resource}")
raise ValueError(f"Invalid resource: {resource}")

return member.name.lower()

Expand All @@ -24,7 +24,7 @@ def get_from_resource_name(cls, resource: str) -> int:
try:
return getattr(cls, resource.upper().replace("-", "_")).value
except (KeyError, AttributeError) as err:
raise ValueError("Invalid resource: {resource}") from err
raise ValueError(f"Invalid resource: {resource}") from err


class APIUsageRaw(models.Model):
Expand Down

0 comments on commit 58d6589

Please sign in to comment.