Skip to content

Commit

Permalink
fix generate_view_url call
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronLieb committed Sep 1, 2024
1 parent dfa882f commit ef3ebf1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ def handle_image(self, from_: str, url: str) -> None:
return

prompt = self.db.get_current_prompt()

if prompt is None:
return

exists = self.db.get_submission_status(user.hash, prompt.id)
if exists:
self.send_message(from_, ALREADY_SUBMITTED)
Expand All @@ -112,7 +116,7 @@ def handle_image(self, from_: str, url: str) -> None:
self.send_message(from_, FAILED_PIC_SAVE)
else:
self.send_message(
from_, VIEW_SUBMISSIONS.format(self.generate_view_url(user.hash))
from_, VIEW_SUBMISSIONS.format(self.generate_view_url(user.hash, prompt.id))
)

def handle_admin_message(self, text: str) -> None:
Expand Down

0 comments on commit ef3ebf1

Please sign in to comment.