{commerce_tax_rate}.description field is non nullable and has no default value, which means that when doing mass insertion of data in an install profile, we have to put an empty string for this field.

{commerce_tax_rate}.display_title could be nullable too, but at least it has a default value.

Comments

rszrama’s picture

Looks like a bit of copy/paste from the Node module's {node_type}.description. I don't see any reason not to supply a default value of '' for these columns, but I'll run it by Damien to make sure we're not introducing problems... my hunch is that since these were typically created via the UI, we always had the empty string coming from the submit form. We definitely want to support direct inserts, but at least the workaround is simple in the meantime. : D

pounard’s picture

Yes of course, nothing really urgent here, but it would be a good cleanup IMHO.

rszrama’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
Issue tags: +low-hanging fruit

Tagging.

wesleydv’s picture

Status: Active » Needs review
StatusFileSize
new780 bytes

Patch.

rszrama’s picture

Status: Needs review » Fixed

As "not null", these shouldn't have a default value, and we needed an update function. Thanks for the first pass, final patch linked below.

Commit: http://drupalcode.org/project/commerce.git/commitdiff/b44211d

Automatically closed -- issue fixed for 2 weeks with no activity.