MigrationWriter.serialize() output invalid python for lambda functions.
Reported by: |
loic84 |
Owned by: |
Tim Graham <timograham@…> |
Component:
|
Migrations
|
Version:
|
dev
|
Severity:
|
Normal
|
Keywords:
|
|
Cc:
|
|
Triage Stage:
|
Accepted
|
Has patch:
|
yes
|
Needs documentation:
|
no
|
Needs tests:
|
no
|
Patch needs improvement:
|
no
|
Easy pickings:
|
no
|
UI/UX:
|
no
|
AssertionError: Could not exec u'import migrations.test_writer\ntest_value_result = migrations.test_writer.<lambda>' (from value <function <lambda> at 0x104c7bde8>): invalid syntax (<string>, line 2)
Change History
(3)
Triage Stage: |
Unreviewed → Accepted
|
Owner: |
set to Tim Graham <timograham@…>
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
PR https://github.com/django/django/pull/1550
We have two options here, either we error out or we nullify them:
lambda *args, **kwargs: None
.I chose the former.