File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 27
27
from requests .utils import quote
28
28
from urllib .parse import urlparse
29
29
30
+ from readthedocs .doc_builder .exceptions import BuildEnvironmentError
30
31
from readthedocs .builds .models import Build , Version
31
32
from readthedocs .core .permissions import AdminPermission
32
33
from readthedocs .core .utils import trigger_build
@@ -108,6 +109,12 @@ class BuildDetail(BuildBase, DetailView):
108
109
109
110
def get_context_data (self , ** kwargs ):
110
111
context = super (BuildDetail , self ).get_context_data (** kwargs )
112
+
113
+ build = self .get_object ()
114
+ if build .error != BuildEnvironmentError .GENERIC_WITH_BUILD_ID .format (build_id = build .pk ):
115
+ # Do not suggest to open an issue if the error is not generic
116
+ return context
117
+
111
118
context ['project' ] = self .project
112
119
scheme = (
113
120
'https://github.com/rtfd/readthedocs.org/issues/new'
Original file line number Diff line number Diff line change @@ -179,9 +179,11 @@ <h3>{% trans "Error" %}</h3>
179
179
</ p >
180
180
< p >
181
181
{% block github_issue_link %}
182
- {% blocktrans with url=issue_url %}
183
- < a href ="{{ url }} "> Report any build issues here</ a > .
184
- {% endblocktrans %}
182
+ {% if issue_url %}
183
+ {% blocktrans trimmed with url=issue_url %}
184
+ < a href ="{{ url }} "> Report any build issues here</ a > .
185
+ {% endblocktrans %}
186
+ {% endif %}
185
187
{% endblock %}
186
188
</ p >
187
189
</ div >
You can’t perform that action at this time.
0 commit comments