Skip to content

Commit d2303cf

Browse files
committed
fix(alerts): Improved validation links and fixed failing test
1 parent 5d15143 commit d2303cf

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

cl/assets/static-global/css/override.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,3 +1924,9 @@ rect.series-segment {
19241924
.relative-options-list li:hover {
19251925
background-color: #f5f5f5;
19261926
}
1927+
1928+
/* Search alerts validation links */
1929+
.link-red a {
1930+
color: #8a1f11;
1931+
text-decoration: underline;
1932+
}

cl/search/templates/includes/alert_modal.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ <h3>
5757
<label for="id_rate">How often should we notify you?</label>
5858
{{ alert_form.rate }}
5959
{% if alert_form.rate.errors %}
60-
<p class="help-block">
60+
<p class="help-block link-red">
6161
{% for error in alert_form.rate.errors %}
6262
{{ error|escape }}
6363
{% endfor %}

cl/search/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def show_results(request: HttpRequest) -> HttpResponse:
130130
# Build the context for the limitations of RECAP alerts.
131131
user = request.user
132132
alerts_context = None
133-
if user.is_authenticated:
133+
if user.is_authenticated and hasattr(user, "profile"):
134134
level = user.membership.level if user.profile.is_member else "free"
135135
# Get the rate counts.
136136
counts = Alert.objects.filter(

0 commit comments

Comments
 (0)