From dbabf43920bfd99f0e720c7c20228c17128a2af8 Mon Sep 17 00:00:00 2001 From: Andrei Kulakov Date: Thu, 29 Jan 2015 16:57:03 -0500 Subject: [PATCH] Updated recommendation for testing keyword arg in custom fields. --- docs/topics/migrations.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/topics/migrations.txt b/docs/topics/migrations.txt index 31d26cb8d79..179dae823f9 100644 --- a/docs/topics/migrations.txt +++ b/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: