Project edit view can't find the default archiver
Bug #1419708 reported by
Caio Begotti
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Capomastro |
Fix Released
|
High
|
Caio Begotti |
Bug Description
Apparently only the Edit Project view can't find the default archiver, so it keeps showing the alert about artifacts not being correctly archived (and accessible), even when there is one default archiver already in place and working. I have checked project creation, dependency creation and edit and they all seem okay though.
Related branches
lp://staging/~caio1982/capomastro/missing-default-archiver-1419708
- Daniel Manrique (community): Approve
-
Diff: 65 lines (+29/-0)3 files modifieddebian/changelog (+6/-0)
projects/tests/test_views.py (+10/-0)
projects/views.py (+13/-0)
lp://staging/~caio1982/capomastro/missing-context-data-for-1419708
- Daniel Manrique (community): Approve
-
Diff: 13 lines (+5/-0)1 file modifiedprojects/views.py (+5/-0)
Changed in capomastro: | |
assignee: | nobody → Caio Begotti (caio1982) |
status: | Triaged → Fix Committed |
Changed in capomastro: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I've seen this too (so confirming).
The ProjectCreateView class has this override for get_context_data:
def get_context_ data(self, **kwargs):
ProjectCre ateView, self).get_ context_ data(** kwargs)
"""
Supplement the project view with an archive check
"""
context = super(
archive = get_default_ archive( )
context[ "archiver" ] = archive
if archive:
return context
I can clearly see it's getting the default archive information. Interestingly, ProjectUpdateView doesn't have this, so I'm pretty sure it's just needs to get the default archive and set "archiver" in the context.
The alert is displayed by a tiny include "projects/ missing_ archiver_ alert.html" which only needs that "archiver" item set in the context so I think we're good to get this fixed.
My only extra request is to first add a failing test for this, then apply the fix :) but that goes without saying.