Skip to content

Commit

Permalink
fixes plural for endpoints in summary.
Browse files Browse the repository at this point in the history
  • Loading branch information
fractos committed Apr 22, 2021
1 parent 4fbdb36 commit 3ca08ce
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/cupcake.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,12 @@ def emit_summary():
for _ in endpoint_group["endpoints"]:
number_of_endpoints = number_of_endpoints + 1

message = "Cupcake is alive and currently monitoring {} endpoints.".format(number_of_endpoints)
endpoint_plural = "s"

if number_of_endpoints == 1:
endpoint_plural = ""

message = "Cupcake is alive and currently monitoring {} endpoint{}.".format(number_of_endpoints, endpoint_plural)

actives = db.get_all_actives()
actives_message = ""
Expand Down

0 comments on commit 3ca08ce

Please sign in to comment.