Project edit view can't find the default archiver

Bug #1419708 reported by Caio Begotti
6
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

Revision history for this message
Daniel Manrique (roadmr) wrote :

I've seen this too (so confirming).

The ProjectCreateView class has this override for get_context_data:

    def get_context_data(self, **kwargs):
        """
        Supplement the project view with an archive check
        """
        context = super(
            ProjectCreateView, self).get_context_data(**kwargs)

        archive = get_default_archive()
        if archive:
            context["archiver"] = 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.

tags: added: low-hanging-fruit
Changed in capomastro:
importance: Undecided → High
milestone: none → 2015-03
status: New → Triaged
Caio Begotti (caio1982)
Changed in capomastro:
assignee: nobody → Caio Begotti (caio1982)
status: Triaged → Fix Committed
Daniel Manrique (roadmr)
Changed in capomastro:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.