Skip to content

Commit

Permalink
Merge pull request #13677 from canonical/cred-schedule-guards-remove
Browse files Browse the repository at this point in the history
Remove scheduling guards for event.
  • Loading branch information
jpmartinspt committed Mar 15, 2024
2 parents 734049e + 96b086f commit 69cc6c8
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions webapp/shop/cred/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,6 @@ def cred_schedule(ua_contracts_api, trueability_api, **_):
scheduled_time = datetime.strptime(
f"{data['date']}T{data['time']}", "%Y-%m-%dT%H:%M"
)
if scheduled_time < datetime.now():
error = "You cannot schedule an exam in the past."
return flask.render_template(
"/credentials/schedule.html", error=error
)
if scheduled_time < now + timedelta(minutes=30):
error = """You cannot schedule an exam less than 30 minutes in
the future."""
return flask.render_template(
"/credentials/schedule.html", error=error
)
starts_at = tz_info.localize(scheduled_time)
contract_item_id = data["contractItemID"]
first_name, last_name = get_user_first_last_name()
Expand Down

0 comments on commit 69cc6c8

Please sign in to comment.