asset.copy_location allows for blank names

Bug #1315038 reported by Blake GH
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
New
Undecided
Unassigned

Bug Description

Running 2.4.1 (and I checked 2.6.0)
Postgres 9.1
Debian squeeze 6.0.7

When there are blank names in the copy location names, the staff client selects that row when tabbing through the interface. To be more specific, if this query returns anything:

select * from asset.copy_location where name='';

The staff client auto completes to the blank name when tabbing through.

I suggest:

-- Cannot have any rows in the data that don't pass the check so update the name to be *something*
update asset.copy_location set name='0' where length(btrim(name))=0;
-- Add the constraint
alter table asset.copy_location ADD CONSTRAINT namechk CHECK (length(btrim(name))>0);

as a possible solution to the database schema

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.