From 6ac13286cb0e39abe07803ccd719a590dca94ccc Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 19 Aug 2015 17:15:02 -0500 Subject: [PATCH] Fix some bugs with new `CustomFieldRenderer`. --- tailbone/forms/renderers/__init__.py | 2 +- tailbone/forms/renderers/core.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tailbone/forms/renderers/__init__.py b/tailbone/forms/renderers/__init__.py index 5fc0aec9..c361b681 100644 --- a/tailbone/forms/renderers/__init__.py +++ b/tailbone/forms/renderers/__init__.py @@ -24,7 +24,7 @@ FormAlchemy Field Renderers """ -from .core import DateFieldRenderer +from .core import CustomFieldRenderer, DateFieldRenderer from .common import (AutocompleteFieldRenderer, DecimalFieldRenderer, CurrencyFieldRenderer, diff --git a/tailbone/forms/renderers/core.py b/tailbone/forms/renderers/core.py index 528eaf4d..e68d4777 100644 --- a/tailbone/forms/renderers/core.py +++ b/tailbone/forms/renderers/core.py @@ -44,8 +44,7 @@ class CustomFieldRenderer(formalchemy.FieldRenderer): if len(args) == 1 and isinstance(args[0], AbstractField): super(CustomFieldRenderer, self).__init__(args[0]) else: - if args: - self.request = args[0] + assert len(args) == 0 self.init(**kwargs) def __call__(self, field):