Skip to content

Instantly share code, notes, and snippets.

@kenji4569
Created November 25, 2011 01:39
Show Gist options
  • Save kenji4569/1392620 to your computer and use it in GitHub Desktop.
Save kenji4569/1392620 to your computer and use it in GitHub Desktop.
--- a/modules/plugin_lazy_options_widget.py
+++ b/modules/plugin_lazy_options_widget.py
@@ -37,6 +37,9 @@ class lazy_options_widget(SQLFORM.widgets.options):
self.keyword = self.keyword % dict(fieldname=field.name)
requires = field.requires
+
+ if isinstance(requires, IS_EMPTY_OR):
+ requires = requires.other
if not isinstance(requires, (list, tuple)):
requires = [requires]
if requires:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment