app/soc/views/models/presence_with_tos.py
changeset 1303 08433090cff8
parent 1256 375632e7ec21
child 1307 091a21cf3627
--- a/app/soc/views/models/presence_with_tos.py	Fri Feb 13 21:52:38 2009 +0000
+++ b/app/soc/views/models/presence_with_tos.py	Fri Feb 13 21:53:15 2009 +0000
@@ -40,7 +40,7 @@
   """View methods for the PresenceWithToS model.
   """
 
-  def __init__(self, params=None):
+  def __init__(self, params):
     """Defines the fields and methods required for the base View class
     to provide the user with list, public, create, edit and delete views.
 
@@ -55,8 +55,9 @@
 
     new_params['edit_extra_dynafields'] = {
         'tos_link_id': widgets.ReferenceField(
-            reference_url='document', filter=['scope_path'],
-            required=False, label=ugettext('Terms of Service Document link ID'),
+            reference_url='document', filter=['scope_path'], required=False,
+            filter_fields={'prefix': params['document_prefix']},
+            label=ugettext('Terms of Service Document link ID'),
             help_text=soc.models.work.Work.link_id.help_text),
         }