oops leaving milestone code_name empty

Bug #475433 reported by Curtis Hovey on 2009-11-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
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

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.

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) on 2009-11-05
Changed in launchpad-registry:
assignee: nobody → Curtis Hovey (sinzui)
status: Triaged → In Progress
Ursula Junque (ursinha) on 2009-11-05
tags: added: current-rollout-blocker
Curtis Hovey (sinzui) wrote :

Fixed in db-devel r8646.

Changed in launchpad-registry:
status: In Progress → Fix Committed
Curtis Hovey (sinzui) on 2009-11-06
Changed in launchpad-registry:
milestone: 3.1.11 → 3.1.10
Curtis Hovey (sinzui) on 2009-11-06
Changed in launchpad-registry:
status: Fix Committed → Fix Released
Curtis Hovey (sinzui) on 2017-05-15
Changed in launchpad:
assignee: Curtis Hovey (sinzui) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers