oops leaving milestone code_name empty

Bug #475433 reported by Curtis Hovey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Unassigned

Bug Description

The OOPS-1405ED465 oops shows the NoneableTextLine is working with None, but it assumes it has a string.

    * Module canonical.launchpad.fields, line 206, in set
      super(StrippedTextLine, self).set(object, value.strip())
    AttributeError: 'NoneType' object has no attribute 'strip'

The milestone code_name is optional. but is effectively required to avoid the oops.

This was not a problem last release when I edited milestones. The StrippedTextLine.set() method was added to by Tim's 2009-10-2 bmp-inline-commit-message branch. It either needs to return early, or NoneableTextLine should test for None before calling super.

Related branches

Revision history for this message
Björn Tillenius (bjornt) wrote : Re: [Bug 475433] [NEW] oops leaving milestone code_name empty

On Thu, Nov 05, 2009 at 02:12:36PM -0000, Curtis Hovey wrote:
> This was not a problem last release when I edited milestones. The
> StrippedTextLine.set() method was added to by Tim's 2009-10-2 bmp-
> inline-commit-message branch. It either needs to return early, or
> NoneableTextLine should test for None before calling super.

Don't forget to consider the case where the field is already set to some
non-None value, and you try to set it to None.

As a side note, we should replace the default TextLine widget with a
widget that always strips the input, so that we don't need to do this in
the field itself.

Revision history for this message
Curtis Hovey (sinzui) wrote :

I do not think that is viable. API does not use widgets. We want the field to normalise values when the field is used by API.

Curtis Hovey (sinzui)
Changed in launchpad-registry:
assignee: nobody → Curtis Hovey (sinzui)
status: Triaged → In Progress
Ursula Junque (ursinha)
tags: added: current-rollout-blocker
Revision history for this message
Curtis Hovey (sinzui) wrote :

Fixed in db-devel r8646.

Changed in launchpad-registry:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in launchpad-registry:
milestone: 3.1.11 → 3.1.10
Curtis Hovey (sinzui)
Changed in launchpad-registry:
status: Fix Committed → Fix Released
Curtis Hovey (sinzui)
Changed in launchpad:
assignee: Curtis Hovey (sinzui) → nobody
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.