#1082 fronted: fixes broken build url
Merged 4 years ago by frostyx. Opened 4 years ago by thrnciar.
copr/ thrnciar/copr bad-group-build-url  into  master

@@ -20,7 +20,7 @@ 

  

  {% if build.copr != copr %}

  <h2 class="build-detail"> Build {{ build.id }} doesn't belong to this project. </h2>

- <p> You can go to <a href="{{url_for("coprs_ns.copr_build", username = build.copr.user.name, coprname = build.copr.name, build_id = build.id)}}">{{ copr_name(build.copr) }}/build/{{build.id}} </a>to see this build. </p>

+ <p> You can go to <a href="{{ copr_url('coprs_ns.copr_build', build.copr, build_id=build.id) }}"> {{ copr_name(build.copr) }}/build/{{build.id}} </a>to see this build. </p>

  {% else %}

  

  {% if g.user and g.user.can_build_in(copr) and build.finished and not build.persistent %}

rebased onto b5e35bbf5330c0a4d0c1aadb66405d86f73acc57

4 years ago

Would it be possible to use copr_url also from _helpers or it doesn't work in this case? It would look much cleaner.

@frostyx, I don't think it's possible, because we need to generate URL by build ID from different copr than it's loaded on that page.

@frostyx, I don't think it's possible, because we need to generate URL by build ID from different copr than it's loaded on that page.

That's alright. If you have a build_from_different_copr, then you can get it's Copr object by build_from_different_copr.copr and pass this to copr_url macro.

rebased onto 2215544fe02682285295dc3627634a31b2432c35

4 years ago

rebased onto 380afc3

4 years ago

Metadata Update from @msuchy:
- Pull-request tagged with: can-be-merged

4 years ago

Commit 96599f6 fixes this pull-request

Pull-Request has been merged by frostyx

4 years ago