Add a temporary hack to allow filtering on org.key().name()
authorSverre Rabbelier <srabbelier@gmail.com>
Wed, 08 Apr 2009 22:20:53 +0000
changeset 2131 1d27ec29f1c7
parent 2130 83f4fab7c556
child 2132 37c6fe0c426c
Add a temporary hack to allow filtering on org.key().name() Patch by: Kai Blin
app/soc/views/helper/templatetags/forms_helpers.py
--- a/app/soc/views/helper/templatetags/forms_helpers.py	Wed Apr 08 22:20:33 2009 +0000
+++ b/app/soc/views/helper/templatetags/forms_helpers.py	Wed Apr 08 22:20:53 2009 +0000
@@ -331,6 +331,10 @@
       if '__scoped__' in filter:
         args['scope_path'] = entity.key().name()
 
+      # TODO: replace this hack needed to get org-scoped mentor autocompletion on student proposals
+      if '__org__' in filter:
+        args['scope_path'] = entity.org.key().name()
+
       params['args'] = '&'.join(['%s=%s' % item for item in args.iteritems()])
 
     select_url = redirects.getSelectRedirect(params)