Code

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#484 closed defect (fixed)

FloatField with decimal_places but not max_digits causes mysql error.

Reported by: mmarshall Owned by: adrian
Component: Database layer (models, ORM) Version:
Severity: major Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

A FloatField that uses decimal_places without max_digits results in using numeric(None, 2). This causes an error in mysql (at least.)

I can see two ways to fix this:

  • Update the docs with this info and/or throw a helpful error message.
  • Set the max_digits to the maximum possible. (255-decimal_places, on mysql at least.)

Note that the same thing also happens when you have max_digits without decimal_places.

MWM

Attachments (0)

Change History (1)

comment:1 Changed 8 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [1314]) Fixed #484 -- Model validator now raises an error for FloatFields without max_digits or decimal_places

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.