浏览代码

Updated recommendation for testing keyword arg in custom fields.

Andrei Kulakov 10 年之前
父节点
当前提交
dbabf43920
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      docs/topics/migrations.txt

+ 1 - 1
docs/topics/migrations.txt

@@ -247,7 +247,7 @@ You can't modify the number of positional arguments in an already migrated
 custom field without raising a ``TypeError``. The old migration will call the
 modified ``__init__`` method with the old signature. So if you need a new
 argument, please create a keyword argument and add something like
-``assert kwargs.get('argument_name') is not None`` in the constructor.
+``assert 'argument_name' in kwargs`` in the constructor.
 
 .. _using-managers-in-migrations: