web/views/forms.py
branchstable
changeset 5660 97343804414b
parent 5656 abe97430b3f5
child 6246 62e25fac41cd
--- a/web/views/forms.py	Thu Jun 03 15:10:48 2010 +0000
+++ b/web/views/forms.py	Thu Jun 03 15:13:41 2010 +0200
@@ -196,9 +196,13 @@
 
     _default_form_action_path = 'edit'
     def form_action(self):
-        if self.action is None:
+        try:
+            action = self.get_action() # avoid spurious warning w/ autoform bw compat property
+        except AttributeError:
+            action = self.action
+        if action is None:
             return self._cw.build_url(self._default_form_action_path)
-        return self.action
+        return action
 
     @deprecated('[3.6] use .add_hidden(name, value, **kwargs)')
     def form_add_hidden(self, name, value=None, **kwargs):