Opened 18 years ago
Closed 18 years ago
#2015 closed defect (fixed)
[patch] syncdb initial sql data regexp breaks if empty string is inserted
Reported by: | Steven Armstrong | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Tools | Version: | dev |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The regexp sql_expr in management.py:get_sql_initial_data_for_model breaks if the inital sql data inserts empty strings.
e.g. in the sql below, the inserts for field2 and field3 break.
insert into mytable (field1, field2, field3) values ('bla', '', "");
The attached patch fixes that.
Attachments (1)
Change History (2)
by , 18 years ago
Attachment: | syncdb_sql-initial-data_allow-empty-string.patch added |
---|
comment:1 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [3003]) Fixed #2015 -- Fixed sqlinitialdata regexp to handle empty string insertions. Thanks, Steven Armstrong