Code

Opened 8 years ago

Closed 8 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
Component: Tools Version: master
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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)

syncdb_sql-initial-data_allow-empty-string.patch (677 bytes) - added by anonymous 8 years ago.

Download all attachments as: .zip

Change History (2)

comment:1 Changed 8 years ago by adrian

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

(In [3003]) Fixed #2015 -- Fixed sqlinitialdata regexp to handle empty string insertions. Thanks, Steven Armstrong

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.