Skip to content

Commit 87af637

Browse files
committed
Fix some trivial typos in comments and classifiers template
1 parent 58d569b commit 87af637

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

warehouse/admin/templates/admin/classifiers/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ <h3 class="box-title">Add New Top-Level Classifier</h3>
3131
<div class="box-body">
3232
<div class="form-group col-sm-4">
3333
<label for="parent">Classifier:</label>
34-
<input name="parent" data-action="input->parent-classifier#update" data-target="parent-classifier.input" class="form-control" autocomplete="off" autocorrect="off" autocapitalize="off">
34+
<input name="parent" id="parent" data-action="input->parent-classifier#update" data-target="parent-classifier.input" class="form-control" autocomplete="off" autocorrect="off" autocapitalize="off">
3535
</div>
3636
</div>
3737
<div class="box-footer">
@@ -53,7 +53,7 @@ <h3 class="box-title">Add Sub-Classifier</h3>
5353
<div class="box-body">
5454
<div class="form-group col-sm-4">
5555
<label for="parent_id">Parent:</label>
56-
<select name="parent_id" data-target="child-classifier.parent" data-action="child-classifier#update">
56+
<select name="parent_id" id="parent_id" data-target="child-classifier.parent" data-action="child-classifier#update">
5757
<option disabled selected>Select one</option>
5858
{% for classifier in classifiers %}
5959
{% if classifier.l5 == 0 %}
@@ -86,8 +86,8 @@ <h3 class="box-title">Deprecate Classifier</h3>
8686
<input name="csrf_token" type="hidden" value="{{ request.session.get_csrf_token() }}">
8787
<div class="box-body">
8888
<div class="form-group col-sm-4">
89-
<label for="parent_id">Classifier:</label>
90-
<select name="classifier_id">
89+
<label for="classifier_id">Classifier:</label>
90+
<select name="classifier_id" id="classifier_id">
9191
<option disabled selected>Select one</option>
9292
{% for classifier in classifiers %}
9393
<option value="{{ classifier.id }}" {{'disabled' if classifier.deprecated else ''}}>

warehouse/db.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,22 @@
4040
DEFAULT_ISOLATION = "READ COMMITTED"
4141

4242

43-
# On the surface this might seem wrong, becasue retrying a request whose data violates
43+
# On the surface this might seem wrong, because retrying a request whose data violates
4444
# the constraints of the database doesn't seem like a useful endeavor. However what
4545
# happens if you have two requests that are trying to insert a row, and that row
4646
# contains a unique, user provided value, you can get into a race condition where both
4747
# requests check the database, see nothing with that value exists, then both attempt to
4848
# insert it. One of the requests will succeed, the other will fail with an
4949
# IntegrityError. Retrying the request that failed will then have it see the object
50-
# created by the other request, and will have it do the appropiate action in that case.
50+
# created by the other request, and will have it do the appropriate action in that case.
5151
#
5252
# The most common way to run into this, is when submitting a form in the browser, if the
5353
# user clicks twice in rapid succession, the browser will send two almost identical
5454
# requests at basically the same time.
5555
#
5656
# One possible issue that this raises, is that it will slow down "legitimate"
5757
# IntegrityError because they'll have to fail multiple times before they ultimately
58-
# fail. We consider this an acceptable trade off, because determinsitic IntegrityError
58+
# fail. We consider this an acceptable trade off, because deterministic IntegrityError
5959
# should be caught with proper validation prior to submitting records to the database
6060
# anyways.
6161
pyramid_retry.mark_error_retryable(IntegrityError)

0 commit comments

Comments
 (0)